home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / dosimp10.zip / SIMPLY4.HYP < prev    next >
Text File  |  1991-08-12  |  104KB  |  1,997 lines

  1.                             The |TDOSKEY|T Command
  2.  
  3. This command is new to DOS version 5.0 and you're going to love it!  You
  4. know the editing keys that DOS has always used before?  Well they are
  5. helpful up to a point, but they're nothing compared to |nDOSKEY|n!
  6.  
  7. It's a TSR, but it only takes 4.5K of RAM even if you enlarge its inter-
  8. nal buffer size to 1024 bytes, and it's just about the most useful 4.5K
  9. you ever spent!  Of course you can LOADHIGH it if you have a 386 with
  10. some extended memory.
  11.  
  12. What does it do?  Well it's very much like 4DOS's command line editing
  13. and aliasing, and it's very much like the third-party History and Alias
  14. and CED utilities.  There are a lot of little utilities that have been
  15. written over the years to perform these functions, but now DOS has its
  16. own, and since it comes with DOS it's guaranteed to work with DOS.
  17.  
  18. It remembers all the commands you've issued for a while, and you can
  19. recall them and edit and re-issue them, instead of just retyping some
  20.                            <page down> for more
  21.                              DOSKEY continued
  22. fifty-character long command that you just issued five minutes ago.  You
  23. can use the <Home> and <End> keys, <Insert> and <Delete> characters,
  24. change whatever you want to change in a previous command, or just re-
  25. enter it the way it was.
  26.  
  27. Another benefit of |nDOSKEY|n is that you can type more than one command on a
  28. line, and execute them all at once, instead of typing one, waiting for it
  29. to complete, typing the next, waiting, etc., whenever you know exactly
  30. what commands you're going to execute next.  For example if you have a
  31. large file that you want to move from the C: drive to the B: drive, in-
  32. stead of typing |nCOPY|n C:FILE.EXT B: and then waiting for that to finish,
  33. then typing DEL C:FILE.EXT, you can instead type |nCOPY|n C:FILE.EXT B:
  34. <Ctrl-T> |nIF|n |nEXIST|n B:FILE.EXT DEL C:FILE.EXT and hit <Enter>, and it will
  35. be done automatically.  (The reason for the IF EXIST command is in case
  36. the COPY operation fails, then the source file won't get automatically
  37. deleted, but if the |nCOPY|n is successful, then it will.)  Now whenever you
  38. type <Ctrl-T> to separate the commands that you are typing all on one
  39. command line, a  symbol will appear on the command line.  That's normal;
  40.                            <page down> for more
  41.                              DOSKEY continued
  42. that's what it's supposed to do.  Of course with DOS we've always been
  43. able to type the next command while the last command is still executing,
  44. but only up to fifteen characters.  On the sixteenth character the key-
  45. board buffer is full and the computer just beeps.  With |nDOSKEY|n you can
  46. enter successive commands up to 128 characters instead of only fifteen.
  47.  
  48. Well as soon as you execute the |nDOSKEY|n command the first time after each
  49. reboot, that loads it into memory and then it starts remembering every
  50. command that you enter.  When its internal buffer gets full, it forgets
  51. the oldest command so that there is room for the next command you type.
  52. It always remembers the most recent commands, however many can fit in the
  53. size of buffer you have chosen to use.
  54.  
  55. The <Up arrow> key will show you the previous commands that you have en-
  56. tered, one at a time, starting with the most recent one.  The <Down ar-
  57. row> key will show you the command that you entered right after you en-
  58. tered the one you're looking at.  Of course if you're looking at the last
  59. command you entered, the <Down arrow> key will show your |ncurrent|n command
  60.                            <page down> for more
  61.                              DOSKEY continued
  62. line, which is blank.  Once you find a command that you would like to re-
  63. issue, just hit the <Enter> key, or edit it first by using the <Home>,
  64. <End>, <Insert>, <Delete>, and <Arrow> keys and then hit <Enter>.
  65.  
  66. The <F7> key will show you all the commands that |nDOSKEY|n has stored in its
  67. buffer, in a numbered list.  To choose a command from the list, hit <F9>
  68. and |nDOSKEY|n will ask you which numbered command you want to execute.  Type
  69. its number and off you go!
  70.  
  71. My favorite is the <F8> key.  If you want to execute the last command
  72. that started with "DI" but it was quite a while ago so you don't want to
  73. go looking for it with the <Up arrow> key, just type DI and hit <F8> and
  74. it will show you the last command you entered that started with "DI" and
  75. if that's not the right one, hit <F8> again and it will show you the last
  76. "DI" command before that.  When you find the one you want, hit <Enter>.
  77.  
  78. The <Page Up> key shows you the very oldest command that is still in DOS-
  79. KEY's buffer, and <Page Down> shows you the most recent command.
  80.                            <page down> for more
  81.                              DOSKEY continued
  82. Now here are all the keys that you can use to edit previous commands be-
  83. fore you re-enter them, or to edit the command you're presently typing.
  84. First of all, the regular DOS editing keys we've always used still work
  85. for the |ncurrent|n command.  (They work a bit different though, than without
  86. |nDOSKEY|n installed, especially if you use the /INSERT switch, so be careful
  87. until you adjust.)  But |nDOSKEY|n adds all of the following:
  88.  
  89. The <Home> key takes the cursor to the leftmost character in the command.
  90. <End> takes you to the space after the rightmost character.  The <Left>
  91. and <Right> arrows move the cursor one space in the indicated direction.
  92. <Ctrl-Left> and <Ctrl-Right> move the cursor to the first character past
  93. the last space past the cursor's |ncurrent|n position.  That sentence needs
  94. an example, huh?  Suppose the command line you're working on says this:
  95.           ABC DEF GHI JKL MNO
  96. Now if your cursor is on the J, <Ctrl-Left> will take you to the G.  But
  97. if the cursor is on the K, L, space, or M, then it will take you to the
  98. J.  If the cursor is on the D, E, F, or space, the <Ctrl-Right> will take
  99. you to the G.
  100.                            <page down> for more
  101.                              DOSKEY continued
  102. The <Backspace> key deletes the character to the left of the cursor.  The
  103. <Delete> key deletes the character that the cursor it on.  <Ctrl-End>
  104. deletes the character that the cursor is on, as well as all the rest of
  105. the characters to the end of the line.  <Ctrl-Home> deletes all the char-
  106. acters to the left of the cursor, making the character that the cursor is
  107. on become the first character of the command.
  108.  
  109. The <Insert> key toggles insert mode on and off.  If insert mode is on,
  110. any character you type will cause the character the cursor is on, and all
  111. the characters to the right of it, to move to the right to make room for
  112. the characters that you type.  If insert mode is off, then whatever you
  113. type will replace the character that the cursor is on.  If you have DOS-
  114. KEY set up so that insert mode is the default, then every time you hit
  115. the <Enter> key to carry out a command, it goes back to insert mode even
  116. if you were in replace mode when you finished editing that command.  The
  117. same thing goes if your |ndefault|n is replace mode; hitting <Enter> takes
  118. you back into your |ndefault|n mode even if you had used the <Insert> key to
  119. temporarily change modes.
  120.                            <page down> for more
  121.                              DOSKEY continued
  122. The <Esc> key erases the entire line that you're working on.
  123.  
  124. You can even use |nDOSKEY|n to create an actual batch file on disk, if you
  125. want to execute the |nbatch file|n as you write it.  Just type the <Alt-F7>
  126. keystroke combination, which erases the |nDOSKEY|n buffer, then execute the
  127. commands that you want the |nbatch file|n to contain, then type this:
  128.           |nDOSKEY|n /HISTORY > NAME.BAT
  129. where NAME.BAT is the |nbatch file|n that you want to create.  The |nDOSKEY|n
  130. /HISTORY switch displays a list of all the commands that are currently in
  131. the buffer, and since you cleared the buffer before you started, "all the
  132. commands" means just those commands you wanted in the |nbatch file|n.  Then
  133. the > means that DOS should use redirection to send that list to a file
  134. named NAME.BAT instead of sending it to the screen as it normally would.
  135. The /HISTORY switch can also be abbreviated as /H.
  136.  
  137. Not only that, but you can also create what DOS calls "|smacros|s" with DOS-
  138. KEY.  They're not really |nmacros|n though.  That term generally means using
  139. one keystroke in the place of a whole bunch of keystrokes.  But |nmacros|n is
  140.                            <page down> for more
  141.                              DOSKEY continued
  142. what DOS called these |nDOSKEY|n things, so we'll have to live with it.  DOS-
  143. KEY's |nmacros|n are really more like |sbatch file|ss than anything else.  Just
  144. really fast batch files though, since |nmacros|n are stored as part of DOS-
  145. KEY's internal buffer so they're always in memory and never need to be
  146. read off the disk except the first time you create the |nmacros|n during each
  147. session.  Don't worry about the fact that the <Alt-F7> combination clears
  148. |nDOSKEY|n's buffer.  It doesn't wipe out the |nmacros|n, just the |nmemory|n of the
  149. most recent commands you've entered.
  150.  
  151. Another way in which |nDOSKEY|n |nmacros|n are better than batch files is that
  152. the files in which they are stored on disk don't take up any disk space.
  153. I mean if you put the |nDOSKEY|n macro-creating commands in your AUTOEXEC.BAT
  154. file, that won't take up any more disk space than the |nAUTOEXEC.BAT|n file
  155. without macro commands did, unless you put in so many macro commands that
  156. the |nAUTOEXEC.BAT|n file gets larger than 2048 bytes, because of the way DOS
  157. deals with disks.  Any file, no matter how small, takes up a whole clus-
  158. ter of disk space, so an |nAUTOEXEC.BAT|n with a bunch of |nDOSKEY|n |nmacros|n that
  159. is 1987 |nbytes|n long, doesn't take any more disk space than an |nAUTOEXEC.BAT|n
  160.                            <page down> for more
  161.                              DOSKEY continued
  162. file with no |nDOSKEY|n |nmacros|n that is 38 bytes long.  For example, you could
  163. put fifteen |nDOSKEY|n |nmacros|n in your AUTOEXEC.BAT file and delete fifteen of
  164. the batch files you used to use, and that would free up fifteen clusters
  165. which is 30K of disk space.
  166.  
  167. There are a few other ways in which a |nDOSKEY|n macro is different from a
  168. batch file.  Since the |nmacros|n are stored in memory instead of on disk,
  169. you don't have to have access to a disk-based .BAT file in order to exec-
  170. ute a macro.  It's just like the macro were an internal DOS command.
  171.  
  172. A macro can only have a total length of 127 characters because the whole
  173. macro goes on one line and DOS commands can only have 128 characters in-
  174. cluding the carriage return (the <Enter> key), whereas there is no limit
  175. to the length of a |nbatch file|n.
  176.  
  177. You can terminate a |nbatch file|n by pressing <Ctrl-C> or <Ctrl-Break>, but
  178. pressing one of those combinations while a macro is executing will only
  179. terminate the command that's running right now.  The next command in the
  180.                            <page down> for more
  181.                              DOSKEY continued
  182. macro, and all the ones following it, will still get executed, just as if
  183. you had used <Ctrl-Break> in a batch file and answered "N" when it asked
  184. "Terminate batch job?"
  185.  
  186. In |nDOSKEY|n |nmacros|n you use $1 through $9 instead of the usual %1 through %9
  187. for replaceable parameters.  You can also use the |nreplaceable|n parameter
  188. $* in |nmacros|n, and what it means is "all parts of the command tail togeth-
  189. er", even if it's more than nine |nparameters|n, instead of just one "word"
  190. at a time as $1 through $9 mean.  For example, if you had a macro named
  191. HELLO and you entered the command HELLO ABC DEF GHI at the prompt, $1 is
  192. ABC, $2 would be DEF, and $3 gets GHI.  But $* would be ABC DEF GHI.
  193.  
  194. The redirection characters that can be used in |nDOSKEY|n |nmacros|n are quite
  195. different from the normal ones.  $L is used in place of <, $G for >,
  196. $G$G for >>, and $B for ||.
  197.  
  198. You cannot use the GOTO or SHIFT commands or turn ECHO off in a |nDOSKEY|n
  199. macro, or even use the @ symbol to suppress the display of a command.
  200.                            <page down> for more
  201.                              DOSKEY continued
  202. You cannot in any way execute a second macro from within one macro, as
  203. you can do using the CALL command for batch files.  You can't run a macro
  204. from within a batch file either, but that's not a big problem since the
  205. purpose of a macro is to save keystrokes.  You don't need to save key-
  206. strokes inside a |nbatch file|n, since you only need to create it once.
  207.  
  208. You can't access an environment variable from within a macro as you can
  209. from within a |nbatch file|n, with a construction such as %PATH%.
  210.  
  211. To create one of these |nDOSKEY|n |nmacros|n, for example if you wanted to create
  212. a macro that would clear the screen and give you a directory listing of
  213. the current |ndirectory|n with the /W and /P switches, you'd just enter this
  214. command:  |nDOSKEY|n MYDIR=CLS $T |nDIR|n /W /P and from that point on, until you
  215. reboot the computer, every time you enter the command MYDIR, the commands
  216. CLS and |nDIR|n /W /P will be executed for you.  Any |nmacros|n that you want to
  217. have active every time you start your computer should have their macro-
  218. creating commands in your AUTOEXEC.BAT file.
  219.  
  220.                            <page down> for more
  221.                              DOSKEY continued
  222. To create a |nDOSKEY|n macro that uses replaceable parameters, it's done just
  223. the same way as it's done in a batch file, but $1 through $9 are used in-
  224. stead of %1 through %9, and if your macro contains more than one command,
  225. they are all placed on the same line with the $T symbol separating com-
  226. mands.  For example,
  227.           |nDOSKEY|n DIRTYPE=DIR $1 $T |nPAUSE|n $T |nTYPE|n $1 $B |nMORE|n
  228. Now every time you execute the command DIRTYPE FILENAME, the following
  229. commands will be executed:
  230.           |nDIR|n FILENAME
  231.           |nPAUSE|n
  232.           |nTYPE|n FILENAME || |nMORE|n
  233. Because $1 means the first "word" that's typed on the command line after
  234. the name of the macro, and $B in |nmacros|n is the || symbol.
  235.  
  236. You can also make a macro that has the same name as a regular DOS com-
  237. mand.  For example if you had a macro that cleared the screen and then
  238. did a DIR command, you could name it |nDIR|n if you wanted to.  DOS would
  239. execute the macro instead of the internal DOS |nDIR|n command whenever you
  240.                            <page down> for more
  241.                              DOSKEY continued
  242. enter DIR as a command.  But if you need to execute the regular |nDIR|n com-
  243. mand instead of your macro, you can just type a <Space> between the DOS
  244. prompt and the |nDIR|n command, and that way DOS would not recognize it as a
  245. macro, but would recognize it as an internal command or executable file.
  246. Isn't that strange?
  247.  
  248. After you create some |nDOSKEY|n |nmacros|n and decide you want to use them
  249. permanently, you can just type |nDOSKEY|n /|nMACROS|n > NAME.BAT to create a
  250. batch file called NAME.BAT which will contain all the |nmacros|n that you
  251. currently have stored in memory.  Now if you edit that file and put the
  252. |nDOSKEY|n command and a <Space> in front of each line, you will have creat-
  253. ed a |nbatch file|n that you can run each time you boot your computer, which
  254. will load all of those |nmacros|n into |nmemory|n.  This is similar to the way
  255. you use |nDOSKEY|n /HISTORY > NAME.BAT to create a |nbatch file|n as described
  256. above, but that makes a file out of all the commands you have typed at
  257. the DOS |nprompt|n.  The /|nMACROS|n switch calls up a list of all the |nmacros|n
  258. you have created since you last rebooted your computer.  It can also be
  259. abbreviated as /M.
  260.                            <page down> for more
  261.                              DOSKEY continued
  262. If your |nDOSKEY|n internal buffer gets too full to store any more |nmacros|n,
  263. you can delete one by setting it equal to nothing, as in |nDOSKEY|n DIRTYPE=
  264. but that won't give the buffer space back to the part of the buffer that
  265. stores every command you type.  It will only free it up for more |nmacros|n.
  266. You can delete all the |nmacros|n from the |ncurrent|n |nDOSKEY|n buffer by typing
  267. the <Alt-F10> keystroke combination.
  268.  
  269. Since the dollar sign ($) is used in |nDOSKEY|n |nmacros|n to represent a lot of
  270. different things, if you want to use a dollar sign that does not have a
  271. special meaning to |nDOSKEY|n, you use a double dollar sign.  For example, if
  272. you have a file named FILE$ and you want to have a macro that backs up
  273. that file to a different disk, then when you enter the command which cre-
  274. ates that macro, the filename will have to be entered as FILE$$, like
  275. this:  |nDOSKEY|n BAK=COPY FILE$$ B:.  |nDOSKEY|n will see the double dollar sign
  276. in that macro definition and know that it's not supposed to do anything
  277. special with that particular dollar sign, even though most dollar signs
  278. are supposed to be interpreted in some way by the |nDOSKEY|n command.
  279.  
  280.                            <page down> for more
  281.                              DOSKEY continued
  282. When you first load |nDOSKEY|n into memory, usually in your AUTOEXEC.BAT
  283. file, if you want its internal buffer to be anything other than 512 bytes
  284. then you have to tell it so, since 512 is the default.  You can set the
  285. size anywhere from 256 |nbytes|n on up.  |nDOSKEY|n /BUFSIZE=#### will do it.
  286.  
  287. You can also tell |nDOSKEY|n whether you want it to |ndefault|n to insert mode
  288. or replace (overstrike) mode.  |nDOSKEY|n /INSERT or |nDOSKEY|n /OVERSTRIKE will
  289. do that.  The |ndefault|n is overstrike so you only need to use that if you
  290. (or your |nAUTOEXEC.BAT|n file) had previously used the command |nDOSKEY|n /IN-
  291. SERT since the last time you |sreboot|sed.
  292.  
  293. The |nDOSKEY|n command also has a switch called /REINSTALL but I can't imag-
  294. ine why anyone would want to use it.  It loads another copy of |nDOSKEY|n
  295. into |nmemory|n, taking up extra |nmemory|n.  It also clears the buffer, but you
  296. can do that with the <Alt-F7> and <Alt-F10> combinations, so why would
  297. you want to load a new copy of |nDOSKEY|n into |nmemory|n?  I don't know.  But
  298. if you want to, you can, by entering |nDOSKEY|n /REINSTALL.
  299.  
  300.                            <page down> for more
  301.                              DOSKEY continued
  302. Well there was a lot of information in that section, huh?  How about a
  303. review?
  304.  
  305. Entering more than one command at a time:
  306.  
  307. <Ctrl-T>      separates commands on the command line
  308.  
  309. Finding a command to edit:
  310.  
  311. <Up arrow>    displays previous command
  312. <Down arrow>  displays next command
  313. <Enter>       executes command
  314. <F7>          numbered list of all commands in buffer
  315. <F8>          type TEXT, then it finds last command that began with TEXT
  316. <F9>          executes a command from the numbered list displayed by <F7>
  317. <Page Up>     earliest command in buffer
  318. <Page Down>   most recent command
  319.  
  320.                            <page down> for more
  321.                              DOSKEY continued
  322. Editing commands:
  323.  
  324. <Home>        moves cursor to first character of command
  325. <End>         moves cursor to end of command
  326. <Left arrow>  moves cursor to left
  327. <Right arrow> moves cursor to right
  328. <Ctrl-Left>   moves cursor to beginning of last word
  329. <Ctrl-Right>  moves cursor to beginning of next word
  330. <Backspace>   deletes character left of cursor
  331. <Delete>      deletes character under cursor
  332. <Ctrl-Home>   deletes all characters left of cursor
  333. <Ctrl-End>    deletes all characters right of cursor
  334. <Insert>      toggles between insert and replace (overstrike) modes
  335. <Escape>      erases the |ncurrent|n command line
  336.  
  337. Naming macro with same name as a DOS command:
  338.  
  339. <Space>NAME   allows execution of command with same NAME as a macro
  340.                            <page down> for more
  341.                              DOSKEY continued
  342. Erasing the |nDOSKEY|n buffer:
  343.  
  344. <Alt-F7>      erases the command buffer
  345. <Alt-F10>     erases the macro buffer
  346.  
  347. Writing macro definitions:
  348.  
  349. $1 -- $9      |nreplaceable|n |nparameters|n; same as %1 -- %9 in batch files
  350. $*            a |nreplaceable|n parameter that means the entire command tail
  351. $L            for |nredirection|n; the < symbol
  352. $G            for |nredirection|n; the > symbol
  353. $G$G          for |nredirection|n; the >> symbol
  354. $B            for |nredirection|n; the || symbol
  355. $T            to separate commands
  356. $$            to represent a dollar sign inside a macro
  357.  
  358.  
  359.  
  360.                            <page down> for more
  361.                              DOSKEY continued
  362. Switches for the |nDOSKEY|n command:
  363.  
  364. /BUFSIZE=#### size of |nDOSKEY|n buffer for commands and |nmacros|n; |ndefault|n 512
  365. /HISTORY (/H) display of all commands in buffer
  366. /INSERT       makes insert mode the |ndefault|n
  367. /|nMACROS|n (/M)  display of all |nmacros|n in buffer
  368. /OVERSTRIKE   makes replace mode the |ndefault|n again if /INSERT was used
  369. /REINSTALL    loads a new copy of |nDOSKEY|n into |nmemory|n, clears buffer
  370.  
  371. Here is an excerpt from my AUTOEXEC.BAT file which shows all the |nDOSKEY|n
  372. parts.  Notice that you must load the |nDOSKEY|n TSR into memory before you
  373. begin issuing any macro-making commands:
  374.            C:\DOS\DOSKEY /BUFSIZE=1024 /INSERT
  375.            C:\DOS\DOSKEY C=COMSAVER $*
  376.            C:\DOS\DOSKEY PCS=C:\PCT\PCSHELL
  377.            C:\DOS\DOSKEY THES=CD C:\AW\THES $t THESAUR $t CD\
  378.            C:\DOS\DOSKEY CB=COMSAVER BROWSE $1
  379.            C:\DOS\DOSKEY 4=CD C:\UTIL $t 4DOS $t CD\
  380.            C:\DOS\DOSKEY HLP=C:\SIMPLY\HLPURSLF C:\SIMPLY\SIMPLY1
  381.                              The |TECHO|T Command
  382.  
  383. This is a batch file command, but it does have some uses on the command
  384. line.  It's used to display text on the screen, or to tell DOS not to
  385. display text on the screen.
  386.  
  387. Whenever DOS loads a copy of the COMMAND.COM file into memory, whether it
  388. be the first copy or another copy, the state of echo is on.  Whenever DOS
  389. finishes executing a |nbatch file|n, and returns to the prompt, it turns echo
  390. on.  What echo on means is that whatever commands are executed from with-
  391. in a |nbatch file|n, will show on the screen as they are read from the batch
  392. file.  If you don't want the commands to show on the screen as they are
  393. executed, then you want to turn echo off.  Then later in the same batch
  394. file if you want the commands to display again, you turn echo back on.
  395. You can also use the |nECHO|n command to display your own text on the screen.
  396. And the |nECHO|n command all by itself with no parameters, will make DOS tell
  397. you whether the |ncurrent|n state of echo is off or on.
  398.  
  399. Suppose you have a |nbatch file|n named TEST.BAT which contains these lines:
  400.                            <page down> for more
  401.                               ECHO continued
  402.           DATE
  403.           TIME
  404.           VER
  405.           |nDIR|n
  406. Now, you execute that batch file by typing TEST <Enter>.  Here's what
  407. will happen to your screen (minus the blank lines):
  408.           C:\>TEST
  409.           C:\>DATE
  410.           |nCurrent|n date is Mon 06-24-1991
  411.           Enter new date (mm-dd-yy): _
  412.           C:\>TIME
  413.           |nCurrent|n time is 05:30:53.72p
  414.           Enter new time: _
  415.           C:\>VER
  416.           MS-DOS Version 5.00
  417.           C:\>DIR
  418.            Volume in drive C is drive C
  419.            Volume Serial Number is 16CB-74E4
  420.                            <page down> for more
  421.                               ECHO continued
  422.            |nDirectory|n of C:\
  423.           COMMAND  COM     47855 05-09-91   5:00a
  424.           AUTOEXEC BAT       861 06-18-91   4:58p
  425.           CONFIG   SYS       287 06-17-91   6:58p
  426.                   3 file(s)      49003 |nbytes|n
  427.                               69025792 |nbytes|n free
  428.           C:\>
  429.           C:\>
  430. Now if you were to add |nECHO|n OFF as the first line of that batch file, and
  431. leave the rest the same, here's what your screen would do instead:
  432.           C:\>TEST
  433.           C:\>ECHO OFF
  434.           |nCurrent|n date is Mon 06-24-1991
  435.           Enter new date (mm-dd-yy): _
  436.           |nCurrent|n time is 05:30:53.72p
  437.           Enter new time: _
  438.           MS-DOS Version 5.00
  439.            Volume in drive C is drive C
  440.                            <page down> for more
  441.                               ECHO continued
  442.            Volume Serial Number is 16CB-74E4
  443.            |nDirectory|n of C:\
  444.           COMMAND  COM     47855 05-09-91   5:00a
  445.           AUTOEXEC BAT       861 06-18-91   4:58p
  446.           CONFIG   SYS       287 06-17-91   6:58p
  447.                   3 file(s)      49003 |nbytes|n
  448.                               69025792 |nbytes|n free
  449.           C:\>
  450. A lot less clutter on the screen this time, huh?  First of all, until af-
  451. ter the first command has executed, echo is still on, so you see the |nECHO|n
  452. OFF command.  (In DOS version 3.3 or later, you can use the @ symbol to
  453. supress the display of any command even when echo is on so if you changed
  454. that line to @ECHO OFF, then it wouldn't show on the screen either.)  But
  455. after that, no more prompts get sent to the screen, and only the output
  456. of each command shows, not the commands that cause the output.
  457.  
  458. Then at the end, notice that there is only one prompt this time.  You
  459. see, when echo is on, DOS is displaying the |nprompt|n for each line, then
  460.                            <page down> for more
  461.                               ECHO continued
  462. looking to see if there is another command in the batch file to be exec-
  463. uted or not.  Well after the DIR command, DOS finds that there aren't any
  464. commands left, so it closes up the |nbatch file|n interpreter and turns echo
  465. on (which doesn't matter this time because echo was on the whole time)
  466. and displays another prompt.  But when echo is off, DOS is not displaying
  467. a |nprompt|n in between each command of the |nbatch file|n, so that last |nprompt|n
  468. that would be showing while DOS looks to see if there are any commands
  469. left in the |nbatch file|n, doesn't show on the screen.  No prompts show on
  470. the screen until the batch interpreter is closed down and echo is turned
  471. back on.
  472.  
  473. How about an example of using the |nECHO|n command to display text onscreen?
  474.           |nECHO|n HELLO.
  475.           |nECHO|n HOW ARE YOU?
  476. Now if that |nbatch file|n were executed, the screen would be like this:
  477.           C:\>ECHO HELLO.
  478.           HELLO.
  479.           C:\>ECHO HOW ARE YOU?
  480.                            <page down> for more
  481.                               ECHO continued
  482.           HOW ARE YOU?
  483.           C:\>
  484.           C:\>
  485. Not exactly what you had intended, right?  Well make the first line of
  486. that batch file @ECHO OFF, leave the rest the same, and execute it:
  487.           HELLO.
  488.           HOW ARE YOU?
  489.           C:\>
  490.  
  491. Well you can also use the |nECHO|n command at the DOS prompt instead of in a
  492. |nbatch file|n, but that's only appropriate if you're using redirection to
  493. send the output of the |nECHO|n command to some other device instead of to
  494. the screen.  For example, |nECHO|n HELLO > PRN would make your printer type
  495. the word HELLO.  (See the section on Device|1s.)
  496.  
  497. Another sort of a device that you can redirect output to, is a filename.
  498. You could actually write a |nbatch file|n to disk by using the |nECHO|n command
  499. with |nredirection|n.  Note that the > symbol creates a brand new file by the
  500.                            <page down> for more
  501.                               ECHO continued
  502. name you specify, and if that file already existed at the time, it gets
  503. erased.  A double >> sign means for DOS to add the text to the already
  504. existing file, without deleting the file first.  So to create the above
  505. TEST.BAT file, you could use these commands from the DOS prompt:
  506.           |nECHO|n DATE > TEST.BAT
  507.           |nECHO|n TIME >> TEST.BAT
  508.           |nECHO|n VER >> TEST.BAT
  509.           |nECHO|n |nDIR|n >> TEST.BAT
  510.  
  511. The |nECHO|n command always sends along a carriage return (the <Enter> key)
  512. at the end of each thing that it sends, so that batch file you just cre-
  513. ated does not say DATE TIME VER |nDIR|n.  It's got each command on a separate
  514. line just like it's supposed to.
  515.  
  516. If you try to display instructions containing one of the redirection
  517. characters using the |nECHO|n command, |nredirection|n will take place and the
  518. results will not be what you expected.  For example, a command like:
  519.  
  520.                            <page down> for more
  521.                               ECHO continued
  522.           |nECHO|n Type |nTYPE|n FILENAME.EXT > PRN
  523.           |nECHO|n to print out this file.
  524. will send the words "Type |nTYPE|n FILENAME.EXT" to the printer.  In later
  525. versions of DOS, though, you can get the results you wanted by using
  526.           |nECHO|n Type "|nTYPE|n FILENAME.EXT > PRN"
  527. The quotation marks keep DOS from performing the redirection.
  528.  
  529. If you execute the command |nECHO|n all by itself with no parameters, it will
  530. say either "|nECHO|n is on" or "|nECHO|n is off".  So how do you get it to send a
  531. blank line to the screen from within a |sbatch file|s?  Well in recent DOS
  532. versions, it will work if you give |nECHO|n. as a command.  That's right,
  533. |nECHO|n-period with no <Space> between.  If that doesn't work for your ver-
  534. sion, you can try |nECHO|n<Space><F7> which will look like |nECHO|n ^@.  The ^@
  535. is the ASCII 0 character which represents the null character, looks like
  536. a <Space>, but isn't a <Space> and in most DOS versions will make |nECHO|n
  537. display a blank line.  If you have DOS version 5 though, and you're run-
  538. ning the DOSKEY program, or if you're running any other version and have
  539. your <F7> key programmed via ANSI.SYS to stand for something else, then
  540.                            <page down> for more
  541.                               ECHO continued
  542. <F7> won't give you ^@.  In that case, find out how your text editor goes
  543. about accepting control characters in the text, and use |nECHO|n <Ctrl-H>
  544. which is a <Backspace> character.  But if you're using a version of DOS
  545. that's so old that |nECHO|n. doesn't work, especially now that Microsoft is
  546. selling DOS 5.0 to the public instead of only to computer dealers, you
  547. should go get version 5.0 and find out just what you've been missing!
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.                            The |TDRIVPARM|T Command
  562.  
  563. This command is used in the CONFIG.SYS file, but it's pretty rare that
  564. it's needed.  It's only necessary if you replace an old floppy drive or
  565. add a new one, that is not supported by the BIOS in your machine or by
  566. your DOS version.  It sets the drive characteristics for existing physic-
  567. al drives.  If you can read and write disks in your |nfloppy|n drive but you
  568. can't properly FORMAT brand new |ndisks|n, then this is probably the command
  569. that will help you.
  570.  
  571. If you think you need to try this command, check your DOS manual because
  572. the syntax and |sdefault|ss are different for different DOS versions.  Also
  573. some brands of DOS don't even support this command.  If you can't make
  574. this work, then try DRIVER.SYS which is a device driver that sets up
  575. logical drives inside of physical drives.
  576.  
  577. But if you do use the |nDRIVPARM|n command, for heaven's sake don't give it
  578. any incorrect information.  Tell it the truth, the whole truth, and noth-
  579. ing but the truth.
  580.  
  581.                              The |TEDIT|T Command
  582.  
  583. This command is new with DOS 5.0, and if you hate EDLIN then you're going
  584. to love this one!  It's a full screen ASCII text editor, with pull-down
  585. menus, mouse support, configurable colors, and on-line help.
  586.  
  587. You can't use this command if the |nQBASIC|n.EXE file is not in the same dir-
  588. ectory with the |nEDIT|n.COM file, or else in a directory listed on your PATH
  589. variable in the environment, or else in the current |ndirectory|n.
  590.  
  591. You can start the EDITor from within DOSSHELL, or at the command line.
  592. From the shell, it's in the Main Group.  From the prompt, just type |nEDIT|n
  593. and the name of the file you want to edit.  For example, |nEDIT|n |nCONFIG.SYS|n
  594. or |nEDIT|n C:\WORD\LETTER.DOC or if you want to create a new file, just |nEDIT|n
  595. will do.
  596.  
  597. To pull down a menu from within the EDITor, all you have to do is hit one
  598. of the <Alt> keys, and the menu bar will light up.  Choose the letter of
  599. the menu you want to see, and there it is.  Use the <Left> and <Right>
  600.                            <page down> for more
  601.                               EDIT continued
  602. arrow keys to move to a different menu, or use <Up> and <Down> to move
  603. to a different selection.  Hit <Enter> to make a selection.  To go back
  604. to editing without selecting a menu option, use <Esc>.
  605.  
  606. The |nEDIT|n command depends on the code in the |nQBASIC|n.EXE file for its op-
  607. eration, and since the PC-DOS QBASIC command depends on some code in the
  608. ROM of a true IBM brand computer, this means that PC-DOS's |nEDIT|n command
  609. won't work on anything but a true IBM computer.  So if you have a clone,
  610. you'll have to have MS-DOS in order to use this command.
  611.  
  612. To get help, just put your cursor on the menu item for which you want
  613. more information and press <F1>.  If you need help in general about how
  614. the EDITor works, when you first start it up, don't give a filename, and
  615. you will see a screen that offers you a Survival Guide.  Choose that.
  616.  
  617. Well, the chapter about the EDITor in the manual is so well done that be-
  618. tween it and the online help, you won't need anything else from me about
  619. it.  Have fun!
  620.  
  621.                             The |TEXE2BIN|T Command
  622.  
  623. This is a command you're not going to need for quite some time.  If you
  624. don't already know what it is, then you may as well erase it from your
  625. hard drive to save space.  It converts .EXE files to .BIN files, and that
  626. is not anything you're ever going to want to do unless you're a software
  627. developer.
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.                             The |TEXPAND|T Command
  642.  
  643. This command is new with DOS version 5.0, and if you install DOS properly
  644. using its own SETUP program, you'll probably never need to use this com-
  645. mand.  You may have noticed that most of the filenames on the disks in
  646. the upgrade package are missing the last character of their extensions.
  647. For example, all the .COM files have an extension of .CO_.  Well the
  648. files are also compressed, so that they take up less disk space.  They
  649. are not usable at all in this format.  The |nEXPAND|n command can put them
  650. back to their normal usable form.
  651.  
  652. Here's an example of the syntax you use:
  653.           |nEXPAND|n A:\HIMEM.SY_ C:\DOS\HIMEM.SYS
  654. That will take the compressed HIMEM.SYS file from the disk in drive A:,
  655. expand it to its usable form, and give it its proper name, and put it in
  656. the \DOS directory on drive C:.  So if you accidentally deleted the HIMEM
  657. .SYS file from your \DOS |ndirectory|n and you couldn't get it back with the
  658. UNDELETE command, or if you had QEMM installed when you installed DOS 5.0
  659. and the SETUP procedure didn't install the |nHIMEM.SYS|n file to begin with,
  660.                            <page down> for more
  661.                              EXPAND continued
  662. that's how you can get it back.
  663.  
  664. If you need to expand more than one file from the original DOS disks,
  665. you can do something like this:
  666.           |nEXPAND|n A:\HIMEM.SY_ A:\EMM386.EX_ A:\ATTRIB.EX_ C:\DOS
  667. That command will expand all three of those files from the original DOS
  668. |ndisks|n, but it will put them into the C:\DOS directory with the same sil-
  669. ly names they have now.  You'll have to use the RENAME command to make
  670. them usable.  You can't specify the full filenames for the |nexpanded|n files
  671. if you expand more than one file at at time.
  672.  
  673. You can't use wildcards with this command.  That's pretty rare, huh?
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.                            The |TFASTOPEN|T Command
  682.  
  683. I would not recommend this command to my worst enemy.  It's just like a
  684. tiny disk cache, only not nearly as well-behaved.  Get yourself a disk
  685. |ncache|n and get rid of this command.
  686.  
  687. Well, what it does is, it stores parts of the directory entries and FAT
  688. that you have already accessed, in RAM which is fast, so that the next
  689. time you need to access those same parts, you can get them from memory
  690. instead of from the slow hard disk.  Yes, that's exactly what a |ncache|n
  691. does, only the |ncache|n does |nFAT|n and |ndirectory|n entries, and all other types
  692. of disk information as well.  And the |ncache|n does it less dangerously.
  693.  
  694. Well I guess it would be pretty silly of me to tell you the syntax for
  695. this command after I just got done telling you not to use it, huh?  So I
  696. guess I won't.
  697.  
  698.  
  699.  
  700.  
  701.                              The |TFCBS|T Command
  702.  
  703. This command is used in the CONFIG.SYS file.  It tells DOS how many File
  704. Control Blocks to keep available.  Only old applications are still using
  705. FCBs.  Nowadays File Handles are used instead.  That's what the FILES
  706. command in |nCONFIG.SYS|n is for.  These are the two methods that DOS has
  707. used to keep track of open files, files that are in use at the moment by
  708. some application.  |nFCBS|n is the old way, |nFILES|n is the new way.  DOS's
  709. default setting for |nFCBS|n is 4, and valid values are 1 through 255.  You
  710. really won't need to use this command unless you use some application
  711. that tells you in its manual to use this command.  The syntax is FCBS=#
  712. where # is the number you want to use, from 1 to 255.
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.                               The |TFC|T Command
  722.  
  723. This command is a lot like COMP, only better.  It compares one file to
  724. another.  It's a good idea to use one of these commands after using the
  725. COPY command, if you copy a file that's really important, and you want to
  726. make absolutely sure that the |nCOPY|n command worked perfectly.  There's no
  727. need to do this on a regular basis though, because DOS just doesn't make
  728. mistakes all that often.  But any time you are tempted to use the /V
  729. switch with the |nCOPY|n command, you're better off leaving out the /V and
  730. using |nCOMP|n or |nFC|n after the copy is made, instead.
  731.  
  732. If your version of DOS has the |nFC|n command, use it.  Otherwise, use |nCOMP|n.
  733. (However, if you're using a disk cache, none of these methods will do you
  734. any good, since what will actually get compared is the destination copy
  735. and the copy in the |ncache|n, rather than the source copy on the disk.)  Af-
  736. ter the |nCOPY|n command is done type |nCOMP|n and press <F3> and <Enter>.  Since
  737. |nCOMP|n has the same number of letters as |nCOPY|n, that will compare the source
  738. file and the destination file.  (See editing keys.)  If you want to use
  739. |nFC|n instead, then after the copy type |nFC|n and hit <Del> <Del> <F3> <Enter>.
  740.                            <page down> for more
  741.                                FC continued
  742. That will delete the P and the Y from the template (DOS's |nmemory|n of the
  743. last command you entered) and then copy the rest of it, the source and
  744. destination filenames, to the |ncurrent|n command line.  This way, you make
  745. sure you end up comparing the right files with each other, without making
  746. any typos, and without even having to type the filenames over.
  747.  
  748. The output of this command is the last line that matches in both files
  749. right before some lines that are different, followed by the lines that
  750. don't match, and finally the first line that matches again.  If there is
  751. another mismatch between the files, then you'll see the corresponding
  752. sequence of lines for that difference, and then the next difference if
  753. there is another one, etc.  If there aren't any differences, |nFC|n will tell
  754. you that instead.
  755.  
  756. The syntax for the |nFC|n command is really easy:
  757.           |nFC|n D:\DIR\FILE1.EXT D:\DIR\FILE2.EXT
  758. where D: is the drive letter for each file, \DIR\ is the directory name
  759. for each file, and FILE#.EXT are the names of the files you want to com-
  760.                            <page down> for more
  761.                                FC continued
  762. pare.  Of course as usual, whatever parts of the file specifications are
  763. the defaults, can be left out.  If one of the files is in the current
  764. directory, you can leave out the D:\DIR\ part for that file and just say
  765. |nFC|n FILE1.EXT D:\DIR\FILE2.EXT and of course if the second file has the
  766. same name as the first, then you can use *.* for its filename, as in:
  767.           |nFC|n FILE1.EXT D:\DIR\*.*
  768.  
  769. There are lots of switches with this command, that can make it do slight-
  770. ly different things.  /A /B /C /L /LB# /N /T /W and /# are the possible
  771. switches.  The /B switch causes a binary comparison rather than an ASCII
  772. comparison, and if you use the /B switch then you don't want to use any
  773. of the other switches with it.  If you are comparing files that have the
  774. extension .BIN, .COM, .EXE, .LIB, .OBJ, or .SYS, then this is the default
  775. so you don't need to specify the switch.  A |nbinary|n comparison means that
  776. the output will be displayed like 00000015: B8 0F.  That's the offset ad-
  777. dress of the mismatch (that means how many bytes past the first byte in
  778. the file) and the hexadecimal codes for the byte in the first file, and
  779. the hex code for the byte in the second file that didn't match it.  The
  780.                            <page down> for more
  781.                                FC continued
  782. rest of the switches are for ASCII comparisons, which means the lines
  783. that don't match are displayed in normal text form.
  784.  
  785. The /A switch gives an abbreviated output.  That means that if there is
  786. more than one line in a row that don't match between the two files, all
  787. the mismatched lines won't be displayed.  Just the last matching line
  788. before the mismatch, then a ... symbol to show that other lines exist,
  789. then the first matching line after the mismatch.  Of course if there's
  790. only one line that doesn't match, that line will be displayed, since it
  791. takes up as much room on your screen to show the line as it takes to show
  792. the ... line that just stands for other lines.
  793.  
  794. The /C switch tells |nFC|n to ignore the case of the letters, so that HELLO
  795. will not be regarded as a mismatch with hello.
  796.  
  797. /L is the default for |nASCII|n files, so it's only used when you want to
  798. make an |nASCII|n comparison on a file that has the extension of .BIN, .COM,
  799. .EXE, .LIB, .OBJ, or .SYS.
  800.                            <page down> for more
  801.                                FC continued
  802. The /LB# switch tells DOS how many lines in a row are allowed to be dif-
  803. ferent, without causing the |nFC|n command to abort.  The default is 100.
  804. The /N switch makes |nFC|n display the line number along with each line.  The
  805. /T switch causes |nFC|n to not expand tabs to spaces.  The /W switch causes
  806. |nFC|n to treat a bunch of consecutive spaces like just one space.  The /#
  807. switch tells |nFC|n how many lines after a mismatch have to match before |nFC|n
  808. should consider that the files are matching again.  The |ndefault|n is 2.  I
  809. can't think of any reason why a body would really want to worry about
  810. that switch.  In fact most of the time you'll want to use no switches, or
  811. maybe the /C or /N switch.  You can pretty much ignore the rest.
  812.  
  813. With one exception.  If all you're interested in is making sure that two
  814. files are identical, and you're not expecting there to be any differences
  815. so you don't care whether the display of the differences is friendly or
  816. not, then either use the /B switch with this command, or use the COMP
  817. command.  Either way is much much faster than doing an ASCII comparison
  818. with the |nFC|n command.
  819.  
  820.  
  821.                             The |TEMM386|T Command
  822.  
  823. Well previous to DOS version 5.0, |nEMM386|n.SYS was just a device driver
  824. that could simulate LIM 4.0 expanded memory in the extended |nmemory|n on a
  825. 386 or higher computer.  But in DOS 5.0, we have |nEMM386|n.EXE instead of
  826. the .SYS version.  It's both a |ndevice driver|n and a command.  Now isn't
  827. that strange?
  828.  
  829. If you have a |n386|n or higher computer with |nextended|n RAM, and if you have
  830. the command DOS=HIGH,UMB in your CONFIG.SYS file, and you have a DEVIC|1E
  831. command for the HIMEM.SYS |nextended|n |nmemory|n manager, then you can use this
  832. command in your |nCONFIG.SYS|n file:
  833.           DEVICE=C:\DOS\EMM386.EXE NOEMS
  834. and you will be able to use the DEVICEHIGH and LOADHIGH commands to put
  835. your device drivers and |sTSR|ss into Upper |nMemory|n.
  836.  
  837. If you have enough |nextended|n |nmemory|n and you make that line like this:
  838.           DEVICE=C:\DOS\EMM386.EXE |nRAM|n
  839. then you can do the same thing, only you'll also get |nexpanded|n |nmemory|n.
  840.                            <page down> for more
  841.                              EMM386 continued
  842. This will eat up some of your upper memory, for the expanded |nmemory|n page
  843. frame, so don't use |nRAM|n in place of NOEMS unless you have an application
  844. that uses |nexpanded|n |nmemory|n.
  845.  
  846. This line has to be placed into the CONFIG.SYS file after the HIMEM.SYS
  847. line but before the lines for any DEVIC|1E commands that load a device that
  848. uses |nexpanded|n |nmemory|n, and before any DEVICEHIGH commands.
  849.  
  850. There are a whole bunch of additional switches and parameters that can be
  851. used with the |nEMM386|n device driver, but you probably won't need any of
  852. them.  They're listed in the manual if you do.
  853.  
  854. The |nEMM386|n |ndevice driver|n without the NOEMS or |nRAM|n |nparameters|n only enables
  855. |nexpanded|n |nmemory|n emulation (that means that the XMS |nmemory|n pretends to be
  856. |nexpanded|n |nmemory|n), but in order to get |nUpper|n |nMemory|n support, you need one
  857. of those |nparameters|n.
  858.  
  859. Now |nEMM386|n can also be used as a command from the DOS prompt if you need
  860. to enable or disable the EMS after it has been created via |nCONFIG.SYS|n.
  861.                              The |TFDISK|T Command
  862.  
  863. This command is used to create, delete, or change hard drive partitions
  864. and to create, delete, or change logical drives within a partition.  Par-
  865. titions and |nlogical drives|n on a hard drive just make it so that you can
  866. have a C: drive and a D: drive and an E: drive, or whatever you want, in-
  867. stead of having a great big C: drive by itself.  |nFDISK|n just divides the
  868. hard drive into different sections, and DOS references each section with
  869. a different drive letter, even though it's really still part of the same
  870. physical hard drive.
  871.  
  872. If you have an MS-DOS or PC-DOS version earlier than 4.0, then you can't
  873. have any hard drive partition larger than 32 mega|sbytes|s.  If you have ver-
  874. sion 4 you can have a larger partition but you have to install the SHARE
  875. TSR every time you boot your computer.  If you have version 5, you can
  876. have whatever size partitions you want without using |nSHARE|n.
  877.  
  878. A partition that's smaller than 16 megs will have a 4K cluster size, and
  879. that's not good.  Because every file on the disk, even a tiny batch file
  880.                            <page down> for more
  881.                               FDISK continued
  882. that's only 27 bytes long, will use up a whole cluster of disk space.  A
  883. partition larger than 16 meg will have only 2K in each cluster, so that
  884. way you only waste half as much disk space with a tiny file.  Unless the
  885. partition is too large, that is, like over 128 megs, because those par-
  886. titions also have the 4K cluster size, or even larger!
  887.  
  888. Don't ever forget that if you change anything about a logical drive or
  889. a partition, with the |nFDISK|n command, every single speck of data on that
  890. logical drive or partition will be lost.  Make sure you have a perfectly
  891. good backup before you do anything with |nFDISK|n other than just switching
  892. the active partition or displaying partition information.  Anything under
  893. the Create Partition or Delete Partition menu entries will remove all the
  894. data from the partition involved and from the ones with higher letters.
  895.  
  896. Another thing that happens when you create or delete logical drives or
  897. partitions, is that drive letters change.  For example, if you have a C:
  898. drive and a D: drive, and you use a RAMdisk whose letter is E:, and then
  899. you use |nFDISK|n to remove your D: partition and put the entire drive space
  900.                            <page down> for more
  901.                               FDISK continued
  902. into C:, then the next time you boot up your RAMdisk will have the letter
  903. D: instead of E:, because a |nRAMdisk|n just gets the next letter in order
  904. after whatever real drives you have.  So you'll need to change all your
  905. |sbatch file|ss that reference the |nRAMdisk|n to make them say D: instead of E:.
  906.  
  907. If your hard drive came with its own partitioning software, then use it
  908. instead of the |nFDISK|n command.
  909.  
  910. After you've changed any partition on your hard drive, you must FORMAT it
  911. before it can be used.  And if you're going to Low-Level Format your hard
  912. drive, then that must be done before the |nFDISK|n procedure.
  913.  
  914. To enlarge a partition, you must delete it and then recreate it.
  915.  
  916. The |nFDISK|n command won't let you delete a partition without your entering
  917. the correct volume label, so if there's something funky about your label
  918. and |nFDISK|n won't accept the label as you type it, exit back to DOS and use
  919. the LABEL command to change the label to something else that |nFDISK|n will
  920. accept.
  921.                              The |TFILES|T Command
  922.  
  923. This command is used in the CONFIG.SYS file, and it tells DOS how many
  924. files can be open or in use at one time.  File handles is the new way
  925. that DOS goes about keeping track of open files, whereas FCBS is the old
  926. way.  If you have an application that tells you to have FILES=15 in your
  927. |nCONFIG.SYS|n file, and another application that tells you to have FILES=30,
  928. then use FILES=30.  Just use the highest number that any of your applica-
  929. tions tells you to use.
  930.  
  931. The higher the number you give in your |nFILES|n command, the more memory
  932. will be used by the table that DOS sets up to keep track of the file han-
  933. dles, so don't use more than you need.  Then again, DOS only uses 39
  934. bytes for each file handle above the default, so having 50 file handles
  935. is only going to use up 1638 |nbytes|n and that's not very much, so if you
  936. have an application that requires FILES=50, don't let it depress you.
  937. You can have anywhere from 8 up to 255, and the |ndefault|n value that DOS
  938. will use if you don't have a |nFILES|n command in your |nCONFIG.SYS|n file is 8.
  939.  
  940.  
  941.                              The |TFIND|T Command
  942.  
  943. This is a highly useful command.  It will search any file for any string
  944. of text.  Of course it's only likely to work on pure ASCII files, because
  945. a file created by a word processor has control codes embedded in it, to
  946. tell it where the margins go and where the words should be in italics,
  947. and things like that.  So the word "little" with control codes embedded
  948. in it might look like "littlΣ" so if you use the |nFIND|n command to look for
  949. "little", it won't be found.  But for |nASCII|n files, the |nFIND|n command works
  950. wonderfully.
  951.  
  952. Well here's how you use it.  Suppose you want to search for the word
  953. "little" in the files named FILE1, FILE2, and FILE3:
  954.           |nFIND|n "little" FILE1 FILE2 FILE3
  955. will do it.  But it won't find the word "little" if it's capitalized at
  956. the beginning of a sentence.  For that you need this command:
  957.           |nFIND|n "Little" FILE1 FILE2 FILE3
  958. But in DOS version 5.0, there's a new switch to the |nFIND|n command.  The /I
  959. switch tells DOS to ignore the case of the letters so that |nFIND|n "little"
  960.                            <page down> for more
  961.                               FIND continued
  962. will find "little" and "Little" and "LITTLE" and "liTtlE".
  963.           |nFIND|n /I "little" FILE1 FILE2 FILE3
  964. would do that if you have DOS version 5.0 or later.
  965.  
  966. If you're using the |nFIND|n command as a filter (explained later in this
  967. section) to find a filename in your directory listings, be sure to type
  968. the filename in capital letters (or else use the /I switch if you have
  969. DOS version 5.0) because filenames are always stored in the |ndirectory|n
  970. listings in all-caps, so |nFIND|n won't find the file HITHERE if you tell
  971. it to search for "ither", but |nFIND|n "ITHER" would work.
  972.  
  973. The output of the find command would be like this:
  974.           ---------- FILE1
  975.           Mary had a little lamb,
  976.           ---------- FILE2
  977.           ---------- FILE3
  978.           Little Red Riding Hood took a basket of fruit to her sick .....
  979.           When Little Red Riding Hood got to her grandmother's house,....
  980.                            <page down> for more
  981.                               FIND continued
  982. It shows the name of each file as it begins searching it, then it shows
  983. each line that contains the word being searched for.  If the word is not
  984. found in a particular file, it doesn't say anything, it just goes on to
  985. search the next file.
  986.  
  987. If you're searching more than one file at a time, you have to type out
  988. each filename separately.  Wildcards can't be used with the |nFIND|n command.
  989. Of course you could get around that by using the FOR command, as in:
  990.           |nFOR|n %a IN (FILE*) DO |nFIND|n /I "little" %a
  991.  
  992. Remember that the |nFIND|n command will search for exactly what you tell it
  993. to search for, no more, and no less.  If you tell it to search for "and"
  994. it will find "and" "hand" "land" and "grandmother".  If you tell it to
  995. search for " and " that would make it leave out "hand" and "land" and all
  996. that, but it will also leave out "and," because there is a comma after
  997. "and" instead of a <Space>.  If you're searching for the word "renamed"
  998. and the word does exist in the file but it's hyphenated at the end of a
  999. line, so that it exists in the file in the form "re-" on one line and
  1000.                            <page down> for more
  1001.                               FIND continued
  1002. "named" on the next line, then |nFIND|n won't find it at all.  The same thing
  1003. if you're searching for a string that is more than one word long, such as
  1004. "my birthday".  If "my" is at the end of one line and "birthday" is at
  1005. the beginning of the next line, then |nFIND|n won't find "my birthday" be-
  1006. cause there's a carriage return instead of a <Space> between those words.
  1007.  
  1008. If the string you want to search for contains any quotation marks, you
  1009. have to type two quotation marks for each one in the string.  For exam-
  1010. ple, to find the string <He said, "Why don't we go to the mall?"> you
  1011. have to use this command:
  1012.           |nFIND|n "He said, ""Why don't we go to the mall?"""
  1013. Each quotation mark in the string you're looking for is replaced by two
  1014. quotation marks, and then the entire string is also enclosed in one more
  1015. set of quotation marks as usual.
  1016.  
  1017. If the file you're searching has a <Ctrl-Z> (End-of-File marker) in it,
  1018. the |nFIND|n command won't search any of the text past that point.
  1019.  
  1020.                            <page down> for more
  1021.                               FIND continued
  1022. The |nFIND|n command has other switches that change its output a little bit,
  1023. and these switches are for all DOS versions, not just 5.0.
  1024.  
  1025. The /V switch tells DOS to find all the lines in the file that do not
  1026. contain the string you're searching for.  Just the opposite of normal.
  1027. Suppose you want to use |nFIND|n as a filter (described below) to find all
  1028. the files in the current directory that were not updated today.
  1029.           |nDIR|n || |nFIND|n /V "6-27-91"
  1030. would do it.
  1031.  
  1032. The /C switch tells DOS to just count the number of lines that contain
  1033. the search string.  It won't display the lines, it will only count them.
  1034. For example, if you want to know how many lines are in the entire file,
  1035.           |nFIND|n /C /V "%$#@!" FILENAME.EXT
  1036. would do it, because the /V tells |nFIND|n to look for lines that do not con-
  1037. tain the string %$#@! and that's going to be all of them, right?  Then
  1038. the /C switch will count how many lines matched the search, and that's
  1039. the total number of lines in the file.
  1040.                            <page down> for more
  1041.                               FIND continued
  1042. The /N switch tells |nFIND|n to display line numbers with each line.  So the
  1043. output in this case will be the line that contains the search string, and
  1044. the line number for that line, for each line that contains the string.
  1045. It might look like this:
  1046.           [2]Little Red Riding Hood took a basket of fruit to her .......
  1047.           [16]When Little Red Riding Hood got to her grandmother's ......
  1048.  
  1049. Well that's all there is to the |nFIND|n command in its normal command form,
  1050. but that's definitely not the only way to use it.  It can also be used as
  1051. a filter.  (Go read the section on redirection and then come back here.)
  1052.  
  1053. A filter is a little command that takes STanDard INput from the keyboard,
  1054. performs some function on that input, and then sends STanDard OUTput to
  1055. the monitor.  The three filters that come with DOS are |nFIND|n, MORE, and
  1056. SORT.
  1057.  
  1058. When you don't supply a filename on the |nFIND|n command line, then you're
  1059. using it as a filter.  Well it doesn't do much good to take input from
  1060.                            <page down> for more
  1061.                               FIND continued
  1062. the keyboard and send output to the screen.  That's why I told you to go
  1063. read about redirection first.  If you redirect the input from somewhere
  1064. else, and/or redirect output to somewhere else, then a filter is very
  1065. useful.
  1066.  
  1067.           |nFIND|n "string" < FILE1 > FILE2
  1068. will create a file named FILE2 that contains only those lines from FILE1
  1069. that contain "string".
  1070.  
  1071.           |nTYPE|n FILE1 || |nFIND|n "string" || |nFIND|n /V "smaller string" > PRN
  1072. will print a list of all the lines in FILE1 that contain "string" but
  1073. do not contain "smaller string".
  1074.  
  1075.           |nDIR|n || |nFIND|n "AB"
  1076. will show you all the lines in your directory that contain the string AB
  1077. in either the filename or the extension.
  1078.  
  1079.           |nDIR|n || |nFIND|n /V "<DIR>"
  1080.                            <page down> for more
  1081.                               FIND continued
  1082. will show you all the lines in your directory that are not subdirectory
  1083. listings.
  1084.  
  1085.           |nDIR|n || |nFIND|n /V "e"
  1086. will show you a |ndirectory|n listing without the lines that say "Volume in
  1087. drive C is..." and "... |nbytes|n free".
  1088.  
  1089. (Of course if you have DOS version 5.0, you can get those last two dis-
  1090. plays by using the new switches to the DIR command instead of using
  1091. |nFIND|n.)
  1092.  
  1093. Well you see that the |nFIND|n command has about a million uses.  Play around
  1094. with it and see what you can do.
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.                            The |TGRAPHICS|T Command
  1102.  
  1103. This command loads a TSR into memory, that will allow you to use the
  1104. <PrtScrn> or <Shift-PrtScrn> key to print your screen even when you're
  1105. not looking at a plain old text screen.  You'll probably want to use the
  1106. /R switch which tells DOS to print black characters on white paper,
  1107. otherwise DOS will tell the printer to print the background in black and
  1108. leave white spaces in the shape of the letters.  Isn't that silly?  That
  1109. will take about a year to print, and about a ribbon and a half!
  1110.  
  1111. If you have DOS version 4 or later, you'll find a file named |nGRAPHICS|n.PRO
  1112. in your DOS directory.  That's the instruction profile that |nGRAPHICS|n will
  1113. use to talk to the printer.  If your printer is not closely enough com-
  1114. patible with an IBM printer, then hopefully your printer dealer supplied
  1115. you with your own .PRO file to use.  Just rename it to |nGRAPHICS|n.PRO and
  1116. the |nGRAPHICS|n command will use it automatically.  It must be in the same
  1117. |ndirectory|n with the |nGRAPHICS|n.COM file though.
  1118.  
  1119.  
  1120.  
  1121.                              The |THELP|T Command
  1122.  
  1123. This command is new to DOS version 5.  If you type just |nHELP|n, you'll get
  1124. a list of all the DOS commands and a very short description of what each
  1125. is for.  If you type this command followed by the name of another com-
  1126. mand, such as |nHELP|n |nATTRIB|n, then the |nHELP|n command will load a copy of the
  1127. ATTRIB command and feed it the /? switch.  So you'll get the exact same
  1128. result as if you'd typed |nATTRIB|n /?.  Because all the commands in DOS 5.0
  1129. have a little screen of syntax information inside them.
  1130.  
  1131. For an example, here's what you'll see if you type |nMD|n /? or |nHELP|n |nMD|n:
  1132.           Creates a |ndirectory|n.
  1133.  
  1134.           |nMKDIR|n [drive:]path
  1135.           |nMD|n [drive:]path
  1136.  
  1137. Not all that helpful, huh?  Only if you've temporarily forgotten how to
  1138. use the command, not if you didn't already know how to use it.
  1139.  
  1140.  
  1141.                             The |TINSTALL|T Command
  1142.  
  1143. This command is used in the CONFIG.SYS file, to load a TSR into memory.
  1144. It can only be used with TSRs that you don't hotkey into, and that don't
  1145. require any help from the command interpreter, because at the time CON-
  1146. FIG.SYS is read, COMMAND.COM (the command interpreter) hasn't been load-
  1147. ed into |nmemory|n yet.
  1148.  
  1149. You can use this command for FASTOPEN, GRAPHICS, KEYB, NLSFUNC, SHARE,
  1150. and many others, but not all TSRs.
  1151.  
  1152. The advantage of using the |nINSTALL|n command in |nCONFIG.SYS|n to load TSRs,
  1153. rather than loading them the normal way from the AUTOEXEC.BAT file, is
  1154. that all TSRs loaded after |nCOMMAND.COM|n has been loaded, receive a copy of
  1155. the environment.  This wastes |nmemory|n.  If you load a |nTSR|n from |nCONFIG.SYS|n,
  1156. |nCOMMAND.COM|n is not in |nmemory|n yet so there is no |nenvironment|n, so obviously
  1157. the |nTSR|n can't get a copy of it to waste |nmemory|n like that.
  1158.  
  1159. The only disadvantages of the |nINSTALL|n command that I can think of, are
  1160.                            <page down> for more
  1161.                              INSTALL continued
  1162. that it doesn't work for all TSRs, and that if you're using DOS version
  1163. 5, there is no INSTALLHIGH command, so you can't LOADHIGH any TSRs that
  1164. you load from CONFIG.SYS in this manner.  And the |nINSTALL|n command didn't
  1165. even exist until DOS version 4.
  1166.  
  1167. The syntax is quite simple.  Just |nINSTALL|n followed by an equals (=) sign
  1168. and then the full |spath|sname for the TSR you want to install:
  1169.           INSTALL=C:\DOS\SHARE.EXE /F:1024 /L:20
  1170. (The /F and /L switches are parameters for the SHARE command, not for the
  1171. |nINSTALL|n command.)  You do have to include the full pathname for the com-
  1172. mand file, unless it is in the root directory of the boo|1t disk, because
  1173. at the time the |nCONFIG.SYS|n file is read, AUTOEXEC.BAT hasn't been run yet
  1174. so the |nPATH|n variable in the environment does not exist, so DOS can't find
  1175. the file unless it's in the |nroot|n |ndirectory|n of the |nboot|n disk, or unless
  1176. you specify the full |npath|n on the |nINSTALL|n command line.  And you don't
  1177. want to leave the command file in the |nroot|n |ndirectory|n, because that clut-
  1178. ters it up.  So go ahead and keep the file in a subdirectory and use the
  1179. full pathname as in that example above.
  1180.  
  1181.                              The |TLABEL|T Command
  1182.  
  1183. This command is used to put an internal label onto a disk.  You know,
  1184. when you do a DIR command and it comes up and says, "Volume in drive C
  1185. is Whatever"?  "Whatever" is the volume label.
  1186.  
  1187. You can use the /V switch with the FORMAT command to put the label on,
  1188. or you can use the |nLABEL|n command.  The syntax is incredibly simple:
  1189.           |nLABEL|n C:
  1190.           |nLABEL|n A:
  1191. Whatever drive's disk you want to label, you just put that letter and
  1192. a colon after the |nLABEL|n command.
  1193.  
  1194. Now DOS will come back and say what the |ncurrent|n volume label of the disk
  1195. is, and ask you what you want to change it to.  You type what you want,
  1196. anything up to eleven characters and it can include spaces, and hit the
  1197. <Enter> key.  If you want to leave the same label, or if you want to de-
  1198. lete the label, then you just hit <Enter> without typing anything.  It
  1199. will ask you if you want to delete the label, so just answer the question
  1200.                            <page down> for more
  1201.                               LABEL continued
  1202. with Y or N depending on what you want to do.
  1203.  
  1204. In recent DOS versions, you can also include the new label on the command
  1205. line, like this:
  1206.           |nLABEL|n C:NEW NAME
  1207. and then it won't ask you anything.  If that won't work for your version
  1208. of DOS, and you need to be able to do this without the command asking you
  1209. for further input, for example for use in a batch file, you can probably
  1210. use |nECHO|n NEW NAME || |nLABEL|n C: instead.  (See redirection.)
  1211.  
  1212. Volume labels are stored as directory entries, and they show up in your
  1213. CHKDSK readouts as Hidden files as well, even though they don't take up
  1214. any disk space like files do.
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.                            The |TLASTDRIVE|T Command
  1222.  
  1223. This command is used in the CONFIG.SYS file to tell DOS how many drives
  1224. you are going to need to be able to access.  The default is E so if you
  1225. have five or fewer drives, then you have no need for this command.  But
  1226. if you already have five drives and you add a RAMdisk or you use the
  1227. DRIVER.SYS device driver to create more logical drives, then you need to
  1228. use this command to tell DOS you need more drive letters.
  1229.           LASTDRIVE=F
  1230. is all there is to the syntax of this command.
  1231.  
  1232. It does take memory for DOS to keep track of all your drives (about 100
  1233. bytes each), so don't use the command LASTDRIVE=Z (the highest allowed)
  1234. unless you really do use 26 drives!
  1235.  
  1236. In DOS version 5, the |ndefault|n is not necessarily E.  It's one letter
  1237. higher than the actual number of physical drives you have.  For example,
  1238. if you only have two floppy drives and a drive C:, then the |ndefault|n will
  1239. be D:.  If you have four |nfloppy|n drives and two hard drive partitions,
  1240. then the |ndefault|n will be G.
  1241.                             The |TLOADFIX|T Command
  1242.  
  1243. This command is new to DOS version 5.  It is necessary for some programs
  1244. because since DOS can load its kernel into high memory, that means that
  1245. programs and applications that are used to loading in a certain general
  1246. area of |nmemory|n, end up loading a lot lower in |nmemory|n than they are used
  1247. to because DOS isn't sitting there in the way.  Well some programs just
  1248. don't deal with it very well, and give an error message such as "Packed
  1249. file corrupt".  If this happens to you, for example with a program named
  1250. HELLO.EXE that's in your C:\UTIL directory, then just issue this command
  1251. instead of HELLO:  |nLOADFIX|n C:\UTIL\HELLO.EXE
  1252.  
  1253. That will load the HELLO.EXE program above the first 64K of conventional
  1254. |nmemory|n, so that the program won't flip out over where it got loaded at.
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.                            The |TLOADHIGH|T Command
  1262.  
  1263. This command is new to version 5.0 of DOS.  If you have a 386 or higher
  1264. computer, with extended memory, and if you have the proper HIMEM, EMM386,
  1265. and DO|1S commands in your CONFIG.SYS file, then you can use this command
  1266. to load TSRs into the Upper |nMemory|n Blocks.
  1267.  
  1268. If you have a line in your AUTOEXEC.BAT file that loads a screen-saver
  1269. TSR that looks like this:
  1270.           C:\UTIL\EXPLOSIV M2
  1271. then you would change that line to look like this:
  1272.           |nLOADHIGH|n C:\UTIL\EXPLOSIV M2
  1273. and the next time you reboot the computer, the screen saver will be in
  1274. |nupper|n |nmemory|n instead of taking up space in your conventional RAM.
  1275.  
  1276. If you load too many TSRs with this command so that you run out of up-
  1277. per |nmemory|n space, nothing bad will happen.  The excess TSRs will just
  1278. get loaded into |nconventional|n |nmemory|n.
  1279.  
  1280. This command can be abbreviated as LH.  (See also |sDEVICEHIGH|s!)
  1281.                              The |TMKDIR|T Command
  1282.  
  1283. This command is used to MaKe a new DIRectory.  It can also be abbrevi-
  1284. ated as MD.  The syntax is just |nMKDIR|n D:\DIR\NAME where D: is the drive
  1285. you want to put the new |ndirectory|n on, and |nDIR|n is the |ndirectory|n you want
  1286. to put the new |ndirectory|n under.  Of course whatever parts of that command
  1287. are the |sdefault|ss, you can leave out.  Some examples:
  1288.           |nMKDIR|n C:\WORD\DOCS
  1289. would make a |ndirectory|n named DOCS underneath the WORD |ndirectory|n on the
  1290. C: drive.
  1291.           |nMKDIR|n \WORD\DOCS
  1292. would make a |ndirectory|n named DOCS under the WORD |ndirectory|n on whatever
  1293. drive is current at the time.
  1294.           |nMKDIR|n DOCS
  1295. would make a |ndirectory|n named DOCS under the |ncurrent|n |ndirectory|n of the cur-
  1296. rent drive.  If the |ncurrent|n |ndirectory|n of the |ncurrent|n drive were C:\WORD,
  1297. then the above three commands would all do the exact same thing.
  1298.           |nMKDIR|n \DOCS
  1299. makes a |ndirectory|n named DOCS in the root |ndirectory|n of the |ncurrent|n drive.
  1300.                            <page down> for more
  1301.                               MKDIR continued
  1302. The longest |spath|sname you're allowed to have is 63 characters, so keep the
  1303. names short.  For example, instead of a name like WORDPROC for your word
  1304. processor, use WP or WORD.  That way, if your subdirectories end up very
  1305. deeply nested, you won't exceed the 63-character limit.  Then again, you
  1306. probably won't want to make any subdirectories more than three or four
  1307. directories deep anyway.
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.                              The |TMORE|T Command
  1322.  
  1323. This command takes its input from the keyboard and sends its output to
  1324. the monitor, one screenful (23 lines) at a time.  What good does that do?
  1325. Not a whole lot.  But wait, this is a very useful command after all.  Be-
  1326. cause you can use it with input redirection, to make it take its input
  1327. from a file instead.  Have you ever used the TYPE command on a large file
  1328. and watched it scroll by on your screen about ten thousand times faster
  1329. than you could read it?  |nTYPE|n FILENAME || |nMORE|n or |nMORE|n < FILENAME would
  1330. make the file go to your screen just one screenful at a time, and at the
  1331. end of each page it would say "-- More --" and that tells you to hit any
  1332. key to make it continue.  When you hit a key, it will show you one more
  1333. screenful, etc.
  1334.  
  1335. Be very careful to make sure you understand the concept of |nredirection|n
  1336. before you go using the second method above, with the < symbol.  Because
  1337. if you accidentally use the > symbol instead, every byte of data in that
  1338. FILENAME file will be erased.  Permanently.  It won't be recoverable with
  1339. the UNDELETE command or anything else.  The first method above, with the
  1340.                            <page down> for more
  1341.                               MORE continued
  1342. || symbol, is much safer although it does have its drawbacks.
  1343.  
  1344. The drawbacks of the || method are that it takes more keystrokes, because
  1345. you have to use the TYPE command, and that any time you use the || symbol
  1346. you create two temporary files on the current disk.  If the |ncurrent|n drive
  1347. is a floppy, that temp file is going to slow you down.  If the disk in
  1348. the |ncurrent|n drive is |swrite-protect|sed, you won't be able to use the || sym-
  1349. bol at all.  And if you use <Ctrl-C> to break out of the operation after
  1350. you hit the <Enter> key, the temp files will be left laying around on the
  1351. disk.  (Of course if you have version 5.0 or later, then the temp files
  1352. used by the operation of the || symbol will be created in whatever drive
  1353. and directory is pointed to by the TEMP environment variable, and it ap-
  1354. pears that breaking out with <Ctrl-C> no longer leaves the files sitting
  1355. there, so none of this is a problem.)  But despite these drawbacks of the
  1356. || method, it's still worth it to use until you're absolutely sure you un-
  1357. derstand the difference between > and <, for the safety of the file you
  1358. want to display.
  1359.  
  1360.                            <page down> for more
  1361.                               MORE continued
  1362. You can also use this command to send the output of some other command
  1363. through it.  For example, |nCHKDSK|n |n*.*|n /V || |nMORE|n, so that you can see the
  1364. CHKDSK report before it all scrolls off the screen.  Just about any time
  1365. your screen tries to show you something faster that you can read it, the
  1366. |nMORE|n command will let you slow it down.  (Except for while your AUTOEXEC
  1367. .BAT and CONFIG.SYS files are executing.  For that, all you can do is use
  1368. your <Pause> key, which isn't all that good of an idea during bootup, or
  1369. put PAUSE as the first command in AUTOEXEC.BAT and put another |nPAUSE|n com-
  1370. mand every two or three lines, save this edited |nAUTOEXEC.BAT|n file, reboot
  1371. and you'll be able to see all those messages that normally fly by.  Now
  1372. edit the file again to remove those |nPAUSE|n commands, and you're back to
  1373. normal.)
  1374.  
  1375. If any of this is confusing you, check out the section on redirection to
  1376. learn about the <, ||, and > symbols and what they do.
  1377.  
  1378.  
  1379.  
  1380.  
  1381.                     How Do You |tWrite-protect|t a |sFloppy|s?
  1382.  
  1383. That's easy!  On a 5.25-inch disk, there is a little notch near the |nupper|n
  1384. right corner, and if you cover that notch up with something that infrared
  1385. light can't pass through, the disk is write-protected.
  1386.  
  1387. On a 3.5-inch disk, there is a little hole in the |nupper|n right corner that
  1388. has a little slidey-gadget in it.  If the hole is closed by the slidey-
  1389. gadget, the disk is not write-protected.  If you slide the slidey-gadget
  1390. up so that light can go through the hole, then it is write-protected.
  1391.  
  1392. Notice that the situation is reversed between 5.25-inch and 3.5-inch
  1393. disks.  On the 5.25, if light can go through, it's not write-protected,
  1394. but on the 3.5, if light can go through, it is write-protected.  Goofy.
  1395.  
  1396. On a 3.5-inch |nHigh|n Density disk, you'll see that there is also another
  1397. hole, in the |nupper|n left corner, that doesn't have a slidey-gadget.  That
  1398. one has nothing to do with write-protection.  It is only there to tell
  1399. the drive that it's a HD disk instead of a Double Density disk.
  1400.                            <page down> for more
  1401.                           Write-protect continued
  1402. Now what does write-protecting a disk do?  Well it protects the disk from
  1403. having DOS write any information to it.  DOS can't delete or change any
  1404. file on a disk while it is write-protected, because the disk drive has
  1405. some sensor in it, that detects whether light will go through that spot
  1406. on the disk's cover or not, and if the disk is write-protected, the drive
  1407. won't let any write-|ncurrent|n through the read/write heads.
  1408.  
  1409. However, if there is a power surge that causes some |nhigh|n voltage to "ac-
  1410. cidentally" travel through the drive's heads, I don't think that write-
  1411. protection will protect the spot on the disk that the heads happen to be
  1412. sitting above.  But anything that deliberately tries to write to a disk
  1413. will be stopped by the write-protection.
  1414.  
  1415. Some disk drives have a little mechanical "pin" that checks for the hole,
  1416. rather than a beam of infrared light.  And maybe some drives have regular
  1417. light instead of infrared.  But as long as the notch on a 5.25" disk is
  1418. covered with some material that neither pin nor light can get through,
  1419. then the disk is write-protected.  And remember that 3.5" disks are back-
  1420. wards from 5.25" ones--if light goes through then it is write-protected.
  1421.                              The |TGOTO|T Command
  1422.  
  1423. This is a batch file command, which has no purpose at the DOS prompt.
  1424. But in a |nbatch file|n, it's a great command.  It sends the execution to
  1425. some other part of the |nbatch file|n, instead of continuing on with the
  1426. commands as they are listed in order.
  1427.  
  1428. Suppose that you want to perform a certain set of commands based on the
  1429. results of an IF test.  Like this, perhaps:
  1430.           @ECHO OFF
  1431.           |nIF|n |nEXIST|n |nAUTOEXEC.BAT|n |nGOTO|n YES
  1432.           (here go the commands that you want performed if the file AUTO-
  1433.           EXEC.BAT does not exist in the current |sdirectory|s)
  1434.           |nGOTO|n END
  1435.           :YES
  1436.           (here go the commands that you want performed if AUTOEXEC.BAT
  1437.           does exist in the |ncurrent|n |ndirectory|n)
  1438.           :END
  1439.  
  1440.                            <page down> for more
  1441.                               GOTO continued
  1442. The word that comes after the |nGOTO|n command is called a label, and when
  1443. the label is later repeated in the batch file, at the point where you
  1444. want the |nGOTO|n to jump to, the label must be preceded by a colon (:) as
  1445. shown in that example.  Also, don't forget the |nGOTO|n END statement after
  1446. the "no" commands, or else the "yes" commands will be executed after the
  1447. "no" commands are finished.  And if you have a |nGOTO|n END statement, then
  1448. you sure do have to remember to put the :END label in the |nbatch file|n
  1449. somewhere, or you'll get a nasty "Label not found" error message, and
  1450. the |nbatch file|n will just quit and leave you with a DOS prompt.
  1451.  
  1452. Another good use for the |nGOTO|n command is in conjunction with replaceable
  1453. parameters.  You can use |nGOTO|n %1 at the beginning of your |nbatch file|n, and
  1454. that way you could combine all of your little batch files into one great
  1455. big |nbatch file|n, to save disk space (since every file takes a whole clus-
  1456. ter of disk space even if the file is only 17 bytes long).  Let's say you
  1457. have batch files named 1.BAT, 2.BAT, and 3.BAT and you want to combine
  1458. them into one |nbatch file|n called GO.BAT.  Here's how:
  1459.  
  1460.                            <page down> for more
  1461.                               GOTO continued
  1462.           @ECHO OFF
  1463.           |nIF|n NOT '%1==' |nGOTO|n %1
  1464.           |nECHO|n The syntax of this command is %0 followed
  1465.           |nECHO|n by a label, where the available labels are
  1466.           |nECHO|n 1, 2, and 3.  For example, to perform the
  1467.           |nECHO|n tasks that used to be in 1.BAT, you enter
  1468.           |nECHO|n %0 1
  1469.           |nGOTO|n END
  1470.           :1
  1471.           (here go the commands that used to be in 1.BAT)
  1472.           |nGOTO|n END
  1473.           :2
  1474.           (here go the commands that used to be in 2.BAT)
  1475.           |nGOTO|n END
  1476.           :3
  1477.           (here go the commands that used to be in 3.BAT)
  1478.           |nGOTO|n END
  1479.           :END
  1480.                            <page down> for more
  1481.                               GOTO continued
  1482. (See the sections on ECHO, IF, and Replaceable Parameters for more infor-
  1483. mation.)
  1484.  
  1485. So now you can delete your 1.BAT, 2.BAT, and 3.BAT files (after you've
  1486. tested to make sure that your new GO.BAT file works right) and free up
  1487. two clusters of disk space.  Because GO.BAT is still small enough to fit
  1488. all in one cluster, so it's only taking up as much space as 1.BAT used to
  1489. take up by itself.
  1490.  
  1491. Notice that in a batch file, %0 always refers to the name of the batch
  1492. file that the %0 is inside of.  So in that example above, every place
  1493. that says "%0" in the |nbatch file|n will be replaced with "GO" when you
  1494. actually run the |nbatch file|n.  But if you change the name of the batch
  1495. file to MENU.BAT, then you won't have to change the inside of the batch
  1496. file, because now every place that says "%0" will say "MENU" instead.
  1497.  
  1498. Remember that only the first 8 characters of a label are noticed by DOS,
  1499. so |nGOTO|n REMEMBER1 is the same as |nGOTO|n REMEMBER2, as far as DOS is concer-
  1500.                            <page down> for more
  1501.                               GOTO continued
  1502. ned.  Having two different labels that are only different in their ninth
  1503. character does no good.  Also, every time DOS goes looking for a label
  1504. that a |nGOTO|n command pointed to, it starts at the very beginning of the
  1505. file, and glances at each line, so if you have a :HERE label near the
  1506. beginning of the file and a :HERE label near the end, the one at the be-
  1507. ginning is the only one DOS will ever |nGOTO|n.
  1508.  
  1509. You can also use labels as comments, just like the REM command, because
  1510. if there is no |nGOTO|n command that points to a particular label, DOS won't
  1511. mind, or even notice it.  DOS completely ignores any line that starts
  1512. with a colon (:), unless it's looking for a specific label because a |nGOTO|n
  1513. command told it to.  You can write anything you want in a batch file af-
  1514. ter a colon, as long as you have the correct label for every |nGOTO|n command
  1515. in the file, it doesn't matter if you also have seventy more labels if
  1516. you want to.  You can also add comments on the same line with a real la-
  1517. bel, because DOS is only going to pay attention to the first word follow-
  1518. ing the colon.  As long as there is a <Space> between the real label and
  1519. the comments, DOS won't care.
  1520.  
  1521.                              What Is the |tBIOS|t?
  1522.  
  1523. |nBIOS|n stands for Basic Input/Output System.  This is the instructions in
  1524. the ROM of the computer that tell it how to communicate with the peri-
  1525. pherals such as the drives, the keyboard, the comm ports, etc.  DOS talks
  1526. to the |nBIOS|n real often, because each computer is a little different from
  1527. every other computer, so DOS couldn't possibly know how to communicate
  1528. with every type of hardware.  So the |nBIOS|n is like the translator between
  1529. DOS and the hardware.  AMI and Phoenix are both very popular brands of
  1530. |nBIOS|n, and every make and model of computer has its very own version.
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.                    Why Do I Need to |tPark|t My Hard Drive?
  1542.  
  1543. A hard drive is sort of like a record player, in that it has some disks
  1544. that hold information, and heads that move on an arm to read that infor-
  1545. mation.  Only the read/write heads on the hard drive float a hair's
  1546. breadth above the surface of the |ndisks|n.
  1547.  
  1548. Now when someone bumps into the computer, the heads might get jarred and
  1549. crash into the surface of the disk, which would most likely destroy the
  1550. data in that spot of the disk, and even damage the disk itself.
  1551.  
  1552. If there's a power surge in the electric lines, a shock might go through
  1553. the computer, including the heads on the disk, and that would also damage
  1554. the data in whatever spot the heads happened to be above at that moment.
  1555.  
  1556. And every time you turn on the |npower|n to your computer, there is a sudden
  1557. shock of voltage moving through all parts of the computer's circuitry.
  1558. Again, whatever part of the disk the heads happen to be sitting above,
  1559. could very well lose its data.
  1560.                            <page down> for more
  1561.                               Park continued
  1562. Parking a hard drive means that the read/write heads are moved over to an
  1563. area of the disk called the landing zone, so that any of these events can
  1564. happen and no data will be damaged.  Only an unused portion of the disk
  1565. might be damaged.  No problem.
  1566.  
  1567. Most recent models of hard drives use voice coil rather than stepper mo-
  1568. tor actuators, and these are self-parking.  That means that whenever pow-
  1569. er is removed, the heads automatically retract to the parked position.
  1570.  
  1571. That means that turning on the power again is not a threat to your data,
  1572. but what about the whole time it's running?  Obviously you can't have the
  1573. heads parked the whole time, or you couldn't get any work done.  But if
  1574. you get up for a cup of coffee, or to answer the doorbell, what if the
  1575. dog rushes past and bumps into the computer?  What if there's a |npower|n
  1576. surge?
  1577.  
  1578. If you can call the manufacturer of your hard drive, and ask them if it's
  1579. ok for your particular brand and model, you should |npark|n your hard drive
  1580.                            <page down> for more
  1581.                               Park continued
  1582. every time you leave your desk for a second!
  1583.  
  1584. But be aware that I meant it when I said to ask the manufacturer of your
  1585. specific disk, because using a parking program that was made for one type
  1586. of disk, on another type of disk, can ruin the drive!
  1587.  
  1588. If you have an older hard drive which uses a stepper motor instead of
  1589. a voice coil actuator, you really need to use a parking program!  It's
  1590. likely that one came with your disk.  If so, use it every time you leave
  1591. your desk, and especially make it the last thing you do before each time
  1592. you turn off the |spower|s!
  1593.  
  1594. Some older parking programs can be really dangerous, as they were intend-
  1595. ed for only one particular type of hard drive, and as I said, using the
  1596. wrong parking program for the drive can ruin it!  But parking programs
  1597. written recently generally check the BIOS to see where is the safe area
  1598. to |npark|n on your particular drive, before doing anything else.  These pro-
  1599. grams are safe to use on any drive, if your |nBIOS|n is correct.
  1600.                            <page down> for more
  1601.                               Park continued
  1602. If you have a 286 or newer machine, do you know who entered your CMOS
  1603. setup?  Was it someone reliable, or was it the computer salesman?  (Those
  1604. are mutually exclusive categories.)  You might want to call the manufac-
  1605. turer of the drive and make sure you have the right numbers in |nCMOS|n for
  1606. the write precomp and landing zone especially, along with all the other
  1607. hard drive settings.
  1608.  
  1609. Many commercial disk utility packages such as PC Tools and SpinRite in-
  1610. clude a |nPARK|n.COM file.  There is even a public domain parking program
  1611. called TIMEPARK that is a TSR, that parks your hard drive every time it
  1612. hasn't been accessed for X minutes (you choose what the X number is).  If
  1613. your hard drive manufacturer says it's ok, then using a parker like that
  1614. is the ultimate in safety!
  1615.  
  1616. Now, how do you unpark your drive when you need to access it again?  Well
  1617. if you have a PC or XT, I think all of those had parking programs that
  1618. couldn't be unparked without a cold boot.  If that's the case with your
  1619. parking program, you will get a message on your screen every time you
  1620.                            <page down> for more
  1621.                               Park continued
  1622. |npark|n, that says something like "Turn |npower|n off now".  See if you can call
  1623. the manufacturer of your hard drive and ask them if there is a newer
  1624. parking program that's safe to use on your disk.
  1625.  
  1626. Otherwise, all parking programs allow the heads to unpark the second any
  1627. software requests a disk access, whether you've |sreboot|sed since you parked
  1628. or not.  For that reason you have to make sure that |nPARK|n is the last com-
  1629. mand you give before shutting off the computer.  If any other external
  1630. command is entered, the heads will unpark in order to read the command
  1631. file.
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.                             The |TCOMMAN|1D|T Command
  1642.  
  1643. COMMAND is the command that activates a secondary shell of COMMAND.COM.
  1644. Secondary shell, you ask?  Well yes, because if there were not already a
  1645. primary |nCOMMAND.COM|n shell, then your computer would just be sitting there
  1646. giving you a cold stare, not even a prompt.  A |nCOMMAND.COM|n shell is what
  1647. gives you a |nprompt|n and then interprets the commands that you enter at the
  1648. |nprompt|n.  That's why it's also called the Command Interpreter.  It might
  1649. be called a shell because it protects you from having to deal with the
  1650. actual binary language that the computer can understand.
  1651.  
  1652. Well if you do a lot of shelling out to DOS from inside some application,
  1653. what that application is doing is using the COMSPEC variable to find out
  1654. where your |nCOMMAND.COM|n file is, and loading another copy of that file in-
  1655. to memory right over top of the application you're working on.  When you
  1656. are done with what you wanted to do in DOS, you type EXIT and hit <Enter>
  1657. and the secondary |nCOMMAND.COM|n shell drops back out of |nmemory|n and leaves
  1658. you right where you were before, in that application.
  1659.  
  1660.                            <page down> for more
  1661.                              COMMAN|1D continued
  1662. Well you can also shell out to a secondary command interpreter right from
  1663. the primary command interpreter, without using some application that has
  1664. a shelling out option, as a middle man.  You probably won't need to do it
  1665. very often, but when you do, COMMAND is the command you use.
  1666.  
  1667. About the most common reason for a beginner to need to shell out to a
  1668. secondary COMMAND.COM is in order to call a second batch file from inside
  1669. another |nbatch file|n.  Of course if you have DOS version 3.3 or later, you
  1670. would want to use the CALL command.  But since that command didn't exist
  1671. until DOS version 3.3, some people still need to use the COMMAND command
  1672. to accomplish this.
  1673.  
  1674. You see, if you just enter the name of a second |nbatch file|n, as a command
  1675. in the first |nbatch file|n, then control will be passed permanently to that
  1676. second |nbatch file|n.  When the second |nbatch file|n is done, you'll just get a
  1677. DOS prompt, and whatever commands were still remaining to be executed in
  1678. the first |nbatch file|n, will never be seen by DOS.  So if you want DOS to
  1679. come back to the first |nbatch file|n after the second |nbatch file|n is done,
  1680.                            <page down> for more
  1681.                              COMMAN|1D continued
  1682. you need the CALL command if you have DOS 3.3 or later, or else you need
  1683. the COMMAND command with the /C switch.  Here is FIRST.BAT:
  1684.           |nECHO|n This is the first |nbatch file|n
  1685.           COMMAND /C SECOND
  1686.           |nECHO|n Back in the first |nbatch file|n again
  1687. And here is SECOND.BAT:
  1688.           |nECHO|n This is the second |nbatch file|n
  1689. Now when you run FIRST.BAT, the first ECHO command will be executed, then
  1690. a secondary command shell will be loaded and the /C switch tells that
  1691. secondary shell to execute the command following the /C.  So SECOND.BAT
  1692. will be called, and then as soon as it's done, since the /C switch was
  1693. used with the COMMAND command, the secondary shell will drop right out
  1694. of memory just as if you had issued the EXIT command, and then FIRST.BAT
  1695. will continue on with the next |nECHO|n command.
  1696.  
  1697. If you don't use the /C switch with the COMMAND command, then you can run
  1698. whatever commands or programs you want, and the secondary processor won't
  1699. drop out of |nmemory|n until you give the |nEXIT|n command.
  1700.                            <page down> for more
  1701.                              COMMAN|1D continued
  1702. Whenever you load a secondary command processor, it gets a copy of your
  1703. |ncurrent|n environment.  So it has the same PATH, PROMPT, and COMSPEC varia-
  1704. bles that you already had, plus whatever else you might have had in your
  1705. |nenvironment|n.  Then you can do whatever you want to do with the environ-
  1706. ment while you're in the secondary shell, and it will not affect the or-
  1707. iginal |nenvironment|n.  When you EXIT back to the primary shell, you will
  1708. still have the exact same |nenvironment|n you had before you loaded the sec-
  1709. ondary shell.
  1710.  
  1711. Also whenever you load a secondary command shell, it starts out with the
  1712. default |nECHO|n ON.  So if you use COMMAND /C to call a second batch file
  1713. from within another |nbatch file|n, it does not inherit the same ECHO state
  1714. that existed in the first |nbatch file|n, as happens with the CALL command.
  1715. Even if |nECHO|n was off in the first |nbatch file|n, you'll have to have the
  1716. command |nECHO|n OFF at the beginning of the second |nbatch file|n too if you
  1717. want it to have its |nECHO|n off as well.
  1718.  
  1719. If you ever run some other shell besides COMMAND.COM, such as the wonder-
  1720.                            <page down> for more
  1721.                              COMMAN|1D continued
  1722. ful shareware program from J. P. Software called 4DOS, that's another oc-
  1723. casion you might be interested in using the COMMAND command.  Suppose you
  1724. are running 4DOS as your primary command interpreter, and you're having
  1725. trouble getting some particular command to work.  You decide that you
  1726. would like to try the same command in regular DOS, to see if it's just a
  1727. quirk in 4DOS that's giving you trouble, or what.  Well you don't have to
  1728. edit your CONFIG.SYS file and reboot in order to load a copy of the regu-
  1729. lar COMMAND.COM to test your theory.  You just use the COMMAND command to
  1730. load a secondary shell, try out that command that's giving you trouble in
  1731. 4DOS, and then use the EXIT command to remove the secondary shell.  (This
  1732. was not to imply that I think you will find any quirks in 4DOS.  It's a
  1733. fantastic program!  It does just about everything that you ever wished
  1734. DOS would do but didn't.  4DOS is about 99.99999% compatible with all the
  1735. applications you use under regular DOS, but it's so much better than reg-
  1736. ular DOS!  It's even better than DOS version 5!)
  1737.  
  1738. Here's another use for the COMMAND command.  Have you ever wanted to use
  1739. a nested FOR command, that is, a |nFOR|n command inside another |nFOR|n command?
  1740.                            <page down> for more
  1741.                              COMMAN|1D continued
  1742. Kinda the same as using COMMAND or CALL to run another batch file from
  1743. within a first |nbatch file|n.  Well in general it's not possible to nest FOR
  1744. commands.  But it can be done using the COMMAND /C command.  Want to copy
  1745. all the .BAT files from the BELFRY directory, and all the .BAT files from
  1746. the UTIL |ndirectory|n, to the disk in drive B:, all in one command?  |nFOR|n %%A
  1747. IN (\BELFRY \UTIL) DO COMMAND /C |nFOR|n %%B IN (%%A\*.BAT) DO |nCOPY|n %%B B:
  1748. would do it.  Not that you'll probably ever want to, but isn't it nice to
  1749. know that it can be done if you ever do?
  1750.  
  1751. The COMMAND command also has a /P switch, which you might recognize from
  1752. the SHELL command in your CONFIG.SYS file.  The switch doesn't belong to
  1753. the |nSHELL|n command, but to the COMMAND command.  It causes the command
  1754. processor being invoked, to become the primary command processor, even if
  1755. there already is a primary one loaded.  This means that it will run the
  1756. AUTOEXEC.BAT file, and that it cannot be exited with the EXIT command.
  1757. The only way to get rid of a command shell that was invoked with the /P
  1758. switch, is to reboot.  So you probably won't ever want to use the /P
  1759. switch except for with the |nSHELL|n command in |nCONFIG.SYS|n.
  1760.                            <page down> for more
  1761.                              COMMAN|1D continued
  1762. If you use the COMMAND command from within a batch file, it's a good idea
  1763. to use %COMSPEC% to reference it.  COMSPEC is an environment variable
  1764. that points to where your copy of COMMAND.COM is located.  And the per-
  1765. cent signs are a way that is used in batch files to reference |nenvironment|n
  1766. variables.  Whenever DOS's |nbatch file|n interpreter sees a word surrounded
  1767. by percent signs, it looks into the |nenvironment|n to see if there is a var-
  1768. iable by the name of the word that's inside the percent signs.  If there
  1769. is, then DOS temporarily replaces the word (for example %COMSPEC%) with
  1770. whatever the word is SET equal to in the |nenvironment|n (for example C:\DOS\
  1771. |nCOMMAND.COM|n).  So if you put %COMSPEC% into your |nbatch file|n in place of
  1772. the word COMMAND, then DOS will replace that with C:\DOS\COMMAND.COM (if
  1773. that's where your |nCOMMAND.COM|n file is) and the correct copy of COMMAND
  1774. .COM will be loaded as the secondary shell.  This is good for in case you
  1775. ever end up with some other copy of |nCOMMAND.COM|n on your disk in a direc-
  1776. tory that's closer to the beginning of your PATH variable than the copy
  1777. of |nCOMMAND.COM|n that is the one you really want to run.  Because DOS will
  1778. execute the first |nCOMMAND.COM|n it finds on the |npath|n if you just say COM-
  1779. MAND in the |nbatch file|n.  If you say %COMSPEC% instead, in the |nbatch file|n,
  1780. then you know for sure that the correct copy of |nCOMMAND.COM|n gets loaded.
  1781.                       The |TSMARTDRV.SYS|T Device Driver
  1782.  
  1783. This is the disk cache that comes with DOS versions 4 and up.  Ok, it's
  1784. not the greatest disk |ncache|n in the world, at all, but if it's the only
  1785. |ncache|n you've got, it's a good one.  You install it, like all device dri-
  1786. vers, with a DEVIC|1E or DEVICEHIGH command in your CONFIG.SYS file.  You
  1787. have to have a hard drive, and extended or expanded memory to use it.  If
  1788. you have both those types of |nmemory|n, use |nextended|n (unless you have a lot
  1789. more |nexpanded|n |nmemory|n to spare than you have of |nextended|n memory).  Because
  1790. it's more efficient.  But don't give it more than 2 mega|sbytes|s, because if
  1791. you do, DOS will spend more time looking in the |ncache|n for the data, than
  1792. it would have taken to go ahead and read the data from the hard drive.
  1793.  
  1794. Here's the syntax for this device:
  1795.           DEVICE=C:\DOS\SMARTDRV.SYS #### /A
  1796. And that assumes, of course, that your |nSMARTDRV.SYS|n file is in the DOS
  1797. directory on your C: drive.  The /A switch means that the |ncache|n will go
  1798. into |nexpanded|n |nmemory|n.  Without the /A, it will go into |nextended|n |nmemory|n.
  1799. The #### parameter is the size of the |ncache|n in kilobytes.  Legal values
  1800.                            <page down> for more
  1801.                           SMARTDRV.SYS continued
  1802. are from 128 to 8192, with the default being 256, and that's about as low
  1803. as you should go.  If you don't have as much memory as you specified, the
  1804. cache will load anyway, and just use whatever |nmemory|n you do have.  Of
  1805. course the DEVIC|1E command has to appear later in CONFIG.SYS than the
  1806. extended (|sHIMEM.SYS|s) or expanded |nmemory|n manager, or else the |ncache|n won't
  1807. have any usable |nmemory|n to go into!
  1808.  
  1809. Do not ever, ever, ever, use a disk optimizer (a program that fixes up
  1810. fragmented files) with a |ncache|n active!  That includes FASTOPEN, SMART-
  1811. Drive, or any other sort of |ncache|n.  If you do, you may as well get out
  1812. your set of BACKUP disks because your FAT is going to get trashed.
  1813.  
  1814. Keep your BUFFERS command at 20 or lower when you're using SMARTDrive.
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.                                |TWhat Is DOS?|T
  1822.  
  1823. DOS stands for Disk Operating System.  It's a bunch of files on a disk,
  1824. that tell the computer how to deal with such things as files, programs,
  1825. disks, and directories.  The main parts of DOS, meaning the Hidden files,
  1826. along with the file COMMAND.COM, have to be loaded into the computer's
  1827. memory each time you turn on the power, or else the computer won't know
  1828. how to do anything.  As long as you have a proper boo|1t disk, this loading
  1829. of DOS into |nmemory|n is handled for you automatically by a tiny software
  1830. program which is permanently stored in the computer on a ROM chip.  Un-
  1831. til DOS is loaded into |nmemory|n, the computer has no idea how to do any-
  1832. thing, other than load DOS into |nmemory|n.  Computers are totally stupid
  1833. until a software program tells them what to do.  Well DOS is the main
  1834. software program that the computer needs, in order to know how to deal
  1835. with any other software program.
  1836.  
  1837. Well that's what DOS is as far as the computer is concerned.  But what is
  1838. DOS to you?  DOS is what lets you organize your files, and optimize your
  1839. system to make it run the way you want it to run.
  1840.                            <page down> for more
  1841.                           What Is DOS? continued
  1842. A file is just the method that DOS uses to store information on a disk.
  1843. All of your programs are made up of files, and all the data you enter in-
  1844. to your programs is stored as files.  If you write a letter using your
  1845. word processor, and you save that letter to disk, you have to give it a
  1846. filename, and then your word processor will tell DOS to write your letter
  1847. to the disk, under that filename.
  1848.  
  1849. You see, DOS acts as an interpreter between you and the computer, and be-
  1850. tween your word processor or other applications and the computer.  DOS
  1851. will let you or your applications create files, move files, copy files,
  1852. rename files, organize files into a directory, and all sorts of great
  1853. things like that.  Most of the DOS commands are even pretty straightfor-
  1854. ward as to what they are named.  For example, the command you use to copy
  1855. a file to a different location is COPY.  The command to erase a file from
  1856. your disk is ERASE.  In order to move a file, you use those two commands
  1857. together.  First you copy the file to a different location, and then you
  1858. erase the original.  DOS doesn't give us a separate MOVE command, so that
  1859. in case something goes wrong with the |nCOPY|n command, the original file
  1860.                            <page down> for more
  1861.                           What Is DOS? continued
  1862. won't automatically get deleted.  If you receive an error message from
  1863. the COPY command, you can figure out what the problem was, correct the
  1864. problem, and make a good copy of the file, before you erase the original.
  1865.  
  1866. Now you have to be careful and always take a look at what you've typed,
  1867. before you hit the <Enter> key, because DOS will do what you say, not
  1868. what you mean.  There's a standing joke in the computer world about how
  1869. someone should put a DWIM (Do What I Mean) key onto a keyboard.  There's
  1870. another joke about an UNDO key.  But those keys don't exist.  DOS does
  1871. exactly what you tell it to do, even if that wasn't what you meant to
  1872. tell it, and in most cases you can't undo it after it's been done.
  1873.  
  1874. One thing that causes a lot of confusion among new computer users is mix-
  1875. ing up the / and \ keys.  They have separate uses, and if you hit / when
  1876. DOS wants to see \, that won't work.  The \ (backslash) is for separating
  1877. directory names, and the / (forward slash) is for switch parameters.
  1878.  
  1879. DOS lets you customize your system to your own taste, by using the files
  1880.                            <page down> for more
  1881.                           What Is DOS? continued
  1882. called CONFIG.SYS and AUTOEXEC.BAT.  These are just plain ASCII text
  1883. files that contain commands that you want to have performed every time
  1884. you turn on the computer.  There are tons of commands that you can use in
  1885. these two files, to make the computer run the way you want it to run.
  1886. You can also use DOSKEY macros, or a batch file, to make the computer do
  1887. things that you want it to do, for which separate commands don't already
  1888. exist.
  1889.  
  1890. There are just so many things that you can do with DOS, that you can't do
  1891. if you don't know how to work with DOS.  Lots of people think that it's
  1892. not necessary to know anything about DOS in order to make a computer go.
  1893. Well, that's true, up to a point, but when something goes wrong, those
  1894. people have to call someone else to fix it.  People who know DOS don't
  1895. have to do that.  In fact, people who know DOS are going to have fewer
  1896. things go wrong in the first place, because they know what to do in order
  1897. to keep things from going wrong.  Well, that's the whole point of this
  1898. "book", is that knowing how to use DOS is going to make your computer
  1899. life a whole lot easier, more enjoyable, and more productive.  So read
  1900. on!
  1901.                          PLEASE IGNORE THIS PAGE!
  1902. |TSET|T|fSIMPLY1|f
  1903. |TSHELL|T|fSIMPLY1|f
  1904. |t286|t|fSIMPLY1|f
  1905. |t386|t|fSIMPLY1|f
  1906. |tANSI.SYS|t|fSIMPLY1|f
  1907. |tATTRIB|t|fSIMPLY1|f
  1908. |tAUTOEXEC.BAT|t|fSIMPLY1|f
  1909. |tBACKUP|t|fSIMPLY1|f
  1910. |tCHKDSK|t|fSIMPLY1|f
  1911. |tCMOS|t|fSIMPLY1|f
  1912. |tCOMSPEC|t|fSIMPLY1|f
  1913. |tCache|t|fSIMPLY1|f
  1914. |tDirectory|t|fSIMPLY1|f
  1915. |tEMS|t|fSIMPLY1|f
  1916. |tEnvironment|t|fSIMPLY1|f
  1917. |tExpanded|t|fSIMPLY1|f
  1918. |tExtended|t|fSIMPLY1|f
  1919. |tHIMEM.SYS|t|fSIMPLY1|f
  1920. |tHidden files|t|fSIMPLY1|f
  1921. |tLIM|t|fSIMPLY1|f
  1922. |tMemory|t|fSIMPLY1|f
  1923. |tRAM|t|fSIMPLY1|f
  1924. |tROM|t|fSIMPLY1|f
  1925. |tShareware|t|fSIMPLY1|f
  1926. |tXMS|t|fSIMPLY1|f
  1927. |tXT|t|fSIMPLY1|f
  1928. |tbytes|t|fSIMPLY1|f
  1929. |tcommercial|t|fSIMPLY1|f
  1930. |tconventional|t|fSIMPLY1|f
  1931. |tcurrent|t|fSIMPLY1|f
  1932. |tdefault|t|fSIMPLY1|f
  1933. |thigh|t|fSIMPLY1|f
  1934. |tmacros|t|fSIMPLY1|f
  1935. |tpublic domain|t|fSIMPLY1|f
  1936. |troot|t|fSIMPLY1|f
  1937. |tupper|t|fSIMPLY1|f
  1938. |TEXIT|T|fSIMPLY2|f
  1939. |TFORMAT|T|fSIMPLY2|f
  1940. |tASCII|t|fSIMPLY2|f
  1941. |tBoo|1t Disk|t|fSIMPLY2|f
  1942. |tDisks|t|fSIMPLY2|f
  1943. |tEDLIN|t|fSIMPLY2|f
  1944. |tExecutable|t|fSIMPLY2|f
  1945. |tLow-Level|t|fSIMPLY2|f
  1946. |tParameters|t|fSIMPLY2|f
  1947. |tPower|t|fSIMPLY2|f
  1948. |tRAMdisk|t|fSIMPLY2|f
  1949. |tReplaceable|t|fSIMPLY2|f
  1950. |tShelling Out|t|fSIMPLY2|f
  1951. |tediting keys|t|fSIMPLY2|f
  1952. |tfloppy|t|fSIMPLY2|f
  1953. |TCALL|T|fSIMPLY3|f
  1954. |TCOMP|T|fSIMPLY3|f
  1955. |TCOPY|T|fSIMPLY3|f
  1956. |TDEVICEHIGH|T|fSIMPLY3|f
  1957. |TDEVIC|1E|T|fSIMPLY3|f
  1958. |TDIR|T|fSIMPLY3|f
  1959. |TDO|1S|T|fSIMPLY3|f
  1960. |TFOR|T|fSIMPLY3|f
  1961. |TKEYB|T|fSIMPLY3|f
  1962. |TNLSFUNC|T|fSIMPLY3|f
  1963. |TSHIFT|T|fSIMPLY3|f
  1964. |tDevice|1s|t|fSIMPLY3|f
  1965. |tPATH|t|fSIMPLY3|f
  1966. |TDOSSHELL|T|fSIMPLY5|f
  1967. |TPAUSE|T|fSIMPLY5|f
  1968. |TREM|T|fSIMPLY5|f
  1969. |TRENAME|T|fSIMPLY5|f
  1970. |TSHARE|T|fSIMPLY5|f
  1971. |TUNDELETE|T|fSIMPLY5|f
  1972. |tBoot|t|fSIMPLY5|f
  1973. |tCOMMAND.COM|t|fSIMPLY5|f
  1974. |tReboot|t|fSIMPLY5|f
  1975. |tWildcards|t|fSIMPLY5|f
  1976. |TDRIVER.SYS|T|fSIMPLY6|f
  1977. |TSORT|T|fSIMPLY6|f
  1978. |TTYPE|T|fSIMPLY6|f
  1979. |tCONFIG.SYS|t|fSIMPLY6|f
  1980. |tFAT|t|fSIMPLY6|f
  1981. |tKeyboard|t|fSIMPLY6|f
  1982. |tLogical Drives|t|fSIMPLY6|f
  1983. |tRedirection|t|fSIMPLY6|f
  1984. |tTSR|t|fSIMPLY6|f
  1985. |tbinary|t|fSIMPLY6|f
  1986. |thexadecimal|t|fSIMPLY6|f
  1987. |TEXIST|T|fSIMPLY5|f
  1988. |TIF|T|fSIMPLY5|f
  1989. |tBatch File|t|fSIMPLY7|f
  1990. |tDevice Driver|t|fSIMPLY3|f
  1991. |tPROMPT|t|fSIMPLY6|f
  1992. |TBUFFERS|T|fSIMPLY3|f
  1993. |tfragmented|t|fSIMPLY1|f
  1994. |TERASE|T|fSIMPLY3|f
  1995. |t*.*|t|fSIMPLY5|f
  1996. |TQBASIC|T|fSIMPLY6|f
  1997.